public class OutputStreamByteSenderImpl extends Object implements ByteSender
ConnectableComponent.ConnectableAutomaton
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedProperty
Closable.CloseAutomaton
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedProperty
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusProperty
Constructor and Description |
---|
OutputStreamByteSenderImpl(OutputStream aOutputStream) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
ConnectionStatus |
getConnectionStatus() |
boolean |
isClosable() |
boolean |
isClosed() |
boolean |
isOpened() |
void |
writeDatagram(byte aDatagram)
Writes (sends) a byte to a listening
DatagramReceiver . |
void |
writeDatagrams(byte[] aDatagram)
Writes (sends) a byte block to a listening
DatagramReceiver or
BlockReceiver . |
void |
writeDatagrams(byte[] aDatagram,
int aOffset,
int aLength) |
public OutputStreamByteSenderImpl(OutputStream aOutputStream) throws OpenException
OpenException
public void writeDatagrams(byte[] aDatagram) throws OpenException
ByteBlockSender
DatagramReceiver
or
BlockReceiver
.writeDatagrams
in interface ByteBlockSender
writeDatagrams
in interface ByteSender
aDatagram
- The byte to be pushed to the receiving
DatagramReceiver
or BlockReceiver
.OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public boolean isClosed()
isClosed
in interface ClosedAccessor
public boolean isOpened()
isOpened
in interface OpenedAccessor
public ConnectionStatus getConnectionStatus()
getConnectionStatus
in interface ConnectionStatusAccessor
public void writeDatagrams(byte[] aDatagram, int aOffset, int aLength) throws OpenException
writeDatagrams
in interface ByteBlockSender
writeDatagrams
in interface ByteSender
OpenException
public void close() throws CloseException
close
in interface Closable
CloseException
public void writeDatagram(byte aDatagram) throws OpenException
ByteDatagramSender
DatagramReceiver
.writeDatagram
in interface ByteDatagramSender
aDatagram
- The byte to be pushed to the receiving
ByteDatagramSender
.OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void flush() throws OpenException
flush
in interface Flushable
OpenException
public boolean isClosable()
isClosable
in interface Closable.CloseAutomaton
Copyright © 2016. All rights reserved.