- java.lang.Object
-
- java.io.OutputStream
-
- org.refcodes.serial.SequenceOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,SequenceAccessor
public class SequenceOutputStream extends OutputStream implements SequenceAccessor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.serial.SequenceAccessor
SequenceAccessor.SequenceBuilder<B extends SequenceAccessor.SequenceBuilder<B>>, SequenceAccessor.SequenceMutator, SequenceAccessor.SequenceProperty
-
-
Constructor Summary
Constructors Constructor Description SequenceOutputStream()Uses the providedSequenceto provideOutputStreamfunctionality.SequenceOutputStream(Sequence aSequence)Uses the providedSequenceto provideOutputStreamfunctionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()SequencegetSequence()Retrieves the value from theSequenceproperty.voidwrite(byte[] aBytes, int aOffset, int aLength)voidwrite(int aByte)-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Constructor Detail
-
SequenceOutputStream
public SequenceOutputStream()
Uses the providedSequenceto provideOutputStreamfunctionality.
-
SequenceOutputStream
public SequenceOutputStream(Sequence aSequence)
Uses the providedSequenceto provideOutputStreamfunctionality.- Parameters:
aSequence- TheSequenceto use.
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
write
public void write(byte[] aBytes, int aOffset, int aLength) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(int aByte) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
getSequence
public Sequence getSequence()
Retrieves the value from theSequenceproperty.- Specified by:
getSequencein interfaceSequenceAccessor- Returns:
- The
Sequencestored by theSequenceproperty.
-
-