Flushable
, org.refcodes.component.Closable
, org.refcodes.component.Closable.CloseAutomaton
, org.refcodes.component.ClosedAccessor
, org.refcodes.component.ConnectableComponent
, org.refcodes.component.ConnectableComponent.ConnectableAutomaton
, org.refcodes.component.ConnectionStatusAccessor
, org.refcodes.component.Flushable
, org.refcodes.component.OpenedAccessor
, ByteSource
, BytesSource
, BytesTransmitter
, ByteTransmitter
, Transmittable
, org.refcodes.mixin.OutputStreamAccessor
public class OutputStreamBytesTransmitter extends Object implements BytesTransmitter
BytesTransmitter.TransmitterOutputStream
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedProperty
org.refcodes.component.ConnectableComponent.ConnectableAutomaton
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<B extends org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<?>>, org.refcodes.mixin.OutputStreamAccessor.OutputStreamMutator, org.refcodes.mixin.OutputStreamAccessor.OutputStreamProperty
Constructor | Description |
---|---|
OutputStreamBytesTransmitter(OutputStream aOutputStream) |
Instantiates a new output stream byte sender impl.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
org.refcodes.component.ConnectionStatus |
getConnectionStatus() |
|
boolean |
isClosable() |
|
boolean |
isClosed() |
|
boolean |
isOpened() |
|
void |
transmitAllBytes(byte[] aDatagram) |
Writes (sends) a byte block.
|
void |
transmitByte(byte aByte) |
Writes (sends) a byte.
|
void |
transmitBytes(byte[] aDatagram,
int aOffset,
int aLength) |
Writes (sends) a byte block.
|
getOutputStream
public OutputStreamBytesTransmitter(OutputStream aOutputStream) throws IOException
aOutputStream
- the output streamIOException
- the open exceptionpublic void transmitAllBytes(byte[] aDatagram) throws IOException
transmitAllBytes
in interface BytesSource
aDatagram
- The byte to be pushed.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public boolean isClosed()
isClosed
in interface org.refcodes.component.ClosedAccessor
public boolean isOpened()
isOpened
in interface org.refcodes.component.ConnectionStatusAccessor
isOpened
in interface org.refcodes.component.OpenedAccessor
public org.refcodes.component.ConnectionStatus getConnectionStatus()
getConnectionStatus
in interface org.refcodes.component.ConnectionStatusAccessor
public void transmitBytes(byte[] aDatagram, int aOffset, int aLength) throws IOException
transmitBytes
in interface BytesSource
transmitBytes
in interface BytesTransmitter
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.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void close() throws IOException
close
in interface org.refcodes.component.Closable
IOException
public void transmitByte(byte aByte) throws IOException
transmitByte
in interface ByteSource
transmitByte
in interface BytesSource
aByte
- The byte to be pushed.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void flush() throws IOException
flush
in interface ByteTransmitter
flush
in interface Flushable
flush
in interface org.refcodes.component.Flushable
IOException
public boolean isClosable()
isClosable
in interface org.refcodes.component.Closable.CloseAutomaton
Copyright © 2021. All rights reserved.