- All Superinterfaces:
org.refcodes.mixin.LengthAccessor
,org.refcodes.mixin.Schemable
,Serializable
,Transmission
- All Known Subinterfaces:
ArraySection<ARRAY>
,ArraySegment<SEGMENT>
,Section.SectionMixin
,Segment.SegmentMixin
- All Known Implementing Classes:
AbstractCipherTransmissionDecorator
,AbstractCrcTransmissionDecorator
,AbstractErrorCorrectionTransmissionDecorator
,AbstractInvertibleTransmissionDecorator
,AbstractLengthDecoratorSegment
,AbstractMagicBytesTransmission
,AbstractMagicBytesTransmissionDecorator
,AbstractPayloadSection
,AbstractPayloadSegment
,AbstractReadyToReceiveTransmissionDecorator
,AbstractReadyToSendTransmissionDecorator
,AbstractReferenceeLengthSegment
,AbstractSectionDecorator
,AbstractSegmentDecorator
,AbstractStopAndWaitPacketStreamTransmissionDecorator
,AbstractStopAndWaitTransmissionDecorator
,AbstractTransmissionDecorator
,AllocSectionDecoratorSegment
,AllocSegmentBody
,AllocSegmentHead
,AsciizArraySegment
,AsciizSegment
,AssertMagicBytesSectionDecorator
,AssertMagicBytesSegment
,AssertMagicBytesSegmentDecorator
,BooleanArraySection
,BooleanSegment
,BreakerSectionDecorator
,BreakerSegmentDecorator
,ByteArraySection
,ByteSegment
,CharArraySection
,CharSection
,CipherSectionDecorator
,CipherSegmentDecorator
,ComplexTypeSegment
,CrcSectionDecorator
,CrcSegmentDecorator
,DoubleArraySection
,DoubleSegment
,DynamicTypeSection
,EnumSegment
,FileSection
,FixedLengthSequenceSegment
,FixedSegmentArraySection
,FloatArraySection
,FloatSegment
,IntArraySection
,IntSegment
,InvertibleSectionDecorator
,InvertibleSegmentDecorator
,LengthSegment
,LengthSegmentDecoratorSegment
,LongArraySection
,LongSegment
,MagicBytesSectionDecorator
,MagicBytesSegment
,MagicBytesSegmentDecorator
,NumberSegment
,PropertiesSection
,ReadyToReceiveSectionDecorator
,ReadyToReceiveSegmentDecorator
,ReadyToSendSectionDecorator
,ReadyToSendSegmentDecorator
,SectionComposite
,SegmentArraySection
,SegmentComposite
,SequenceNumberSegment
,SequenceSection
,ShortArraySection
,ShortSegment
,StopAndWaitPacketStreamSectionDecorator
,StopAndWaitPacketStreamSegmentDecorator
,StopAndWaitSectionDecorator
,StopAndWaitSegmentDecorator
,StringArraySection
,StringSection
- Enclosing interface:
- Transmission
Default implementation of the
Transmission
interface providing an
implementation of the transmitTo(OutputStream, InputStream)
method using the Transmission.toSequence()
method.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.LengthAccessor
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.Transmission
Transmission.TransmissionMixin
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
transmitTo
(OutputStream aOutputStream, InputStream aReturnStream) Default implementation harnessing theTransmission.toSequence()
method.Methods inherited from interface org.refcodes.serial.Transmission
getLength, toSchema, toSequence, toSimpleTypeMap, transmitTo, transmitTo
-
Method Details
-
transmitTo
Default implementation harnessing theTransmission.toSequence()
method. Transmits theSequence
representing the implementing type's instance to the givenOutputStream
. Implementations providing error correction methods use the provided feedbackInputStream
to do some sort of "stop-and-wait ARQ" or apply similar methods to ensure correctness of the transmitted data.- Specified by:
transmitTo
in interfaceTransmission
- Parameters:
aOutputStream
- TheOutputStream
where to write this instance'sSequence
to.aReturnStream
- AnInputStream
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.- Throws:
IOException
- thrown in case writing data to theOutputStream
caused problems.
-