org.refcodes.mixin.LengthAccessor
, Section
, Serializable
, Transmission
, Transmission.TransmissionMixin
ArraySection<ARRAY>
AbstractPayloadSection
, AssertMagicBytesSectionDecorator
, BooleanArraySection
, ByteArraySection
, CharArraySection
, CharSection
, DoubleArraySection
, DynamicTypeSegment
, FileSection
, FixedSegmentArraySection
, FloatArraySection
, IntArraySection
, LongArraySection
, MagicBytesSectionDecorator
, PropertiesSection
, SectionComposite
, SegmentArraySection
, SequenceSection
, ShortArraySection
, StringArraySection
, StringSection
public static interface Section.SectionMixin extends Transmission.TransmissionMixin, Section
Section
interface providing an
implementation of the
receiveFrom(InputStream, int, OutputStream)
method using the
Section.fromTransmission(Sequence, int)
method or the
Section.fromTransmission(Sequence, int, int)
method..org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
Section.SectionMixin
Transmission.TransmissionMixin
Modifier and Type | Method | Description |
---|---|---|
default void |
receiveFrom(InputStream aInputStream,
int aLength,
OutputStream aReturnStream) |
Default implementation harnessing the
Section.fromTransmission(Sequence, int) method. |
fromTransmission, fromTransmission, fromTransmission, fromTransmission, receiveFrom, receiveFrom
fromInputStream, getLength, toSchema, toSimpleTypeMap, toTransmission, transmitTo, transmitTo
transmitTo
default void receiveFrom(InputStream aInputStream, int aLength, OutputStream aReturnStream) throws IOException, TransmissionException
Section.fromTransmission(Sequence, int)
method. (Re-)initializes this instance by receiving the according
Sequence
from the given InputStream
. Implementations
providing error correction methods use the provided feedback
OutputStream
to do some sort of "stop-and-wait ARQ" or apply
similar methods to ensure correctness of the received data.receiveFrom
in interface Section
aInputStream
- The InputStream
from which to read the
instance's (re-)initialization Sequence
from.aLength
- The length of data assigned by the byte array.aReturnStream
- An OutputStream
being the return channel to
handle "stop-and-wait ARQ" or the like in case of a bidirectional
connection. Can be null in case we have a unidirectional
connection.IOException
- thrown in case reading data from the
InputStream
caused problems.TransmissionException
- thrown in case a given InputStream
bytes cannot be processed.Copyright © 2021. All rights reserved.