- 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 providedSequence
to provideOutputStream
functionality.SequenceOutputStream(Sequence aSequence)
Uses the providedSequence
to provideOutputStream
functionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Sequence
getSequence()
Retrieves the value from theSequence
property.void
write(byte[] aBytes, int aOffset, int aLength)
void
write(int aByte)
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Constructor Detail
-
SequenceOutputStream
public SequenceOutputStream()
Uses the providedSequence
to provideOutputStream
functionality.
-
SequenceOutputStream
public SequenceOutputStream(Sequence aSequence)
Uses the providedSequence
to provideOutputStream
functionality.- Parameters:
aSequence
- TheSequence
to use.
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] aBytes, int aOffset, int aLength) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(int aByte) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
getSequence
public Sequence getSequence()
Retrieves the value from theSequence
property.- Specified by:
getSequence
in interfaceSequenceAccessor
- Returns:
- The
Sequence
stored by theSequence
property.
-
-