Class OutputStreamBytesTransmitter
java.lang.Object
org.refcodes.io.OutputStreamBytesTransmitter
- All Implemented Interfaces:
Flushable, Closable, Closable.CloseAutomaton, ClosedAccessor, ConnectableComponent, ConnectableComponent.ConnectableAutomaton, ConnectionStatusAccessor, Flushable, OpenedAccessor, ByteSource, BytesSource, BytesTransmitter, ByteTransmitter, Transmittable, OutputStreamAccessor
The Class OutputStreamBytesTransmitter.
-
Nested Class Summary
Nested classes/interfaces inherited from interface BytesTransmitter
BytesTransmitter.TransmitterOutputStreamNested classes/interfaces inherited from interface Closable
Closable.CloseAutomaton, Closable.CloseBuilder<B>Nested classes/interfaces inherited from interface ClosedAccessor
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedPropertyNested classes/interfaces inherited from interface ConnectableComponent
ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface ConnectionStatusAccessor
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusPropertyNested classes/interfaces inherited from interface Flushable
Flushable.FlushBuilder<B>Nested classes/interfaces inherited from interface OpenedAccessor
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedPropertyNested classes/interfaces inherited from interface OutputStreamAccessor
OutputStreamAccessor.OutputStreamBuilder<B>, OutputStreamAccessor.OutputStreamMutator, OutputStreamAccessor.OutputStreamProperty -
Constructor Summary
ConstructorsConstructorDescriptionOutputStreamBytesTransmitter(OutputStream aOutputStream) Instantiates a new output stream byte sender impl. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()booleanbooleanisClosed()booleanisOpened()voidtransmitByte(byte aByte) Writes (sends) a byte.voidtransmitBytes(byte[] aDatagram) Writes (sends) a byte block.voidtransmitBytes(byte[] aDatagram, int aOffset, int aLength) Writes (sends) a byte block.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BytesTransmitter
getOutputStreamMethods inherited from interface Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface Flushable
flushUnchecked, isFlushable
-
Constructor Details
-
OutputStreamBytesTransmitter
Instantiates a new output stream byte sender impl.- Parameters:
aOutputStream- the output stream- Throws:
IOException- the open exception
-
-
Method Details
-
transmitBytes
Writes (sends) a byte block.- Specified by:
transmitBytesin interfaceBytesSource- Parameters:
aDatagram- The byte to be pushed.- Throws:
IOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceClosedAccessor
-
isOpened
public boolean isOpened()- Specified by:
isOpenedin interfaceConnectionStatusAccessor- Specified by:
isOpenedin interfaceOpenedAccessor
-
getConnectionStatus
- Specified by:
getConnectionStatusin interfaceConnectionStatusAccessor
-
transmitBytes
Writes (sends) a byte block.- Specified by:
transmitBytesin interfaceBytesSource- Specified by:
transmitBytesin interfaceBytesTransmitter- Parameters:
aDatagram- The byte to be pushed.aOffset- The offset from which to take the data.aLength- The number of elements to push starting at the given offset.- Throws:
IOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
close
- Specified by:
closein interfaceClosable- Throws:
IOException
-
transmitByte
Writes (sends) a byte.- Specified by:
transmitBytein interfaceByteSource- Specified by:
transmitBytein interfaceBytesSource- Parameters:
aByte- The byte to be pushed.- Throws:
IOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
flush
- Specified by:
flushin interfaceByteTransmitter- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
isClosable
public boolean isClosable()- Specified by:
isClosablein interfaceClosable.CloseAutomaton
-