Class OutputStreamConnectionBytesTransmitter
java.lang.Object
org.refcodes.component.AbstractConnectable
org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.io.AbstractBytesTransmitter
org.refcodes.io.OutputStreamConnectionBytesTransmitter
- All Implemented Interfaces:
Flushable, Closable, Closable.CloseAutomaton, ClosedAccessor, ConnectableComponent, ConnectableComponent.ConnectableAutomaton, ConnectionComponent<OutputStream>, ConnectionComponent.ConnectionAutomaton<OutputStream>, ConnectionOpenable<OutputStream>, ConnectionOpenable.ConnectionOpenAutomaton<OutputStream>, ConnectionStatusAccessor, Flushable, OpenedAccessor, ByteSource, BytesSource, BytesTransmitter, ByteTransmitter, ConnectionBytesTransmitter<OutputStream>, Transmittable, OutputStreamAccessor
public class OutputStreamConnectionBytesTransmitter
extends AbstractBytesTransmitter
implements ConnectionBytesTransmitter<OutputStream>
A
OutputStreamConnectionBytesTransmitter is a
DatagramTransmitter connected through I/O streams with a
InputStreamConnectionReceiver. A Socket or a
ServerSocket may be used to retrieve the according I/O streams.-
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 ConnectionComponent
ConnectionComponent.ConnectionAutomaton<CON>, ConnectionComponent.ConnectionComponentBuilder<CON,B> Nested classes/interfaces inherited from interface ConnectionOpenable
ConnectionOpenable.ConnectionOpenAutomaton<CON>, ConnectionOpenable.ConnectionOpenBuilder<CON,B> Nested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()booleanisOpenable(OutputStream aOutputStream) voidopen(OutputStream aOutputStream) voidtransmitByte(byte aByte) Writes (sends) a byte.Methods inherited from class AbstractBytesTransmitter
transmitBytesMethods inherited from class AbstractConnectableAutomaton
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatusMethods inherited from class AbstractConnectable
isThrownAsOfAlreadyClosedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BytesSource
transmitBytesMethods inherited from interface BytesTransmitter
getOutputStream, transmitBytesMethods inherited from interface Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface Closable.CloseAutomaton
isClosableMethods inherited from interface ClosedAccessor
isClosedMethods inherited from interface ConnectionOpenable
openUncheckedMethods inherited from interface ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface Flushable
flushUnchecked, isFlushable
-
Constructor Details
-
OutputStreamConnectionBytesTransmitter
public OutputStreamConnectionBytesTransmitter()
-
-
Method Details
-
open
- Specified by:
openin interfaceConnectionOpenable<OutputStream>- Throws:
IOException
-
isOpenable
- Specified by:
isOpenablein interfaceConnectionOpenable.ConnectionOpenAutomaton<OutputStream>
-
flush
- Specified by:
flushin interfaceByteTransmitter- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
close
- Specified by:
closein interfaceClosable- Overrides:
closein classAbstractConnectableAutomaton- 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.
-