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
, ShortSource
, ShortsSource
, ShortsTransmitter
, ShortTransmitter
, Transmittable
public class OutputStreamShortsTransmitter extends Object implements ShortsTransmitter
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
Constructor | Description |
---|---|
OutputStreamShortsTransmitter(OutputStream aOutputStream) |
Instantiates a new output stream short sender impl.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
org.refcodes.component.ConnectionStatus |
getConnectionStatus() |
|
boolean |
isClosable() |
|
boolean |
isClosed() |
|
boolean |
isOpened() |
|
void |
transmitAllShorts(short[] aDatagram) |
Writes (sends) a short block.
|
void |
transmitShort(short aShort) |
Writes (sends) a short.
|
void |
transmitShorts(short[] aDatagram,
int aOffset,
int aLength) |
Writes (sends) a short block.
|
public OutputStreamShortsTransmitter(OutputStream aOutputStream) throws IOException
aOutputStream
- the output streamIOException
- the open exceptionpublic void transmitAllShorts(short[] aDatagram) throws IOException
transmitAllShorts
in interface ShortsSource
aDatagram
- The short 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 transmitShorts(short[] aDatagram, int aOffset, int aLength) throws IOException
transmitShorts
in interface ShortsSource
transmitShorts
in interface ShortsTransmitter
aDatagram
- The short 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 transmitShort(short aShort) throws IOException
transmitShort
in interface ShortSource
transmitShort
in interface ShortsSource
aShort
- The short 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 Flushable
flush
in interface org.refcodes.component.Flushable
flush
in interface ShortTransmitter
IOException
public boolean isClosable()
isClosable
in interface org.refcodes.component.Closable.CloseAutomaton
Copyright © 2021. All rights reserved.