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.ConnectionComponent<OutputStream>
, org.refcodes.component.ConnectionComponent.ConnectionAutomaton<OutputStream>
, org.refcodes.component.ConnectionOpenable<OutputStream>
, org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<OutputStream>
, org.refcodes.component.ConnectionStatusAccessor
, org.refcodes.component.Flushable
, org.refcodes.component.OpenedAccessor
, ByteSource
, BytesSource
, BytesTransmitter
, ByteTransmitter
, ConnectionBytesTransmitter<OutputStream>
, Transmittable
, org.refcodes.mixin.OutputStreamAccessor
public class OutputStreamConnectionBytesTransmitter extends AbstractBytesTransmitter implements ConnectionBytesTransmitter<OutputStream>
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.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.ConnectionComponent.ConnectionAutomaton<CON extends Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
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 |
---|---|
OutputStreamConnectionBytesTransmitter() |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
boolean |
isOpenable(OutputStream aOutputStream) |
|
void |
open(OutputStream aOutputStream) |
|
void |
transmitByte(byte aByte) |
Writes (sends) a byte.
|
transmitBytes
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
transmitAllBytes
getOutputStream, transmitBytes
closeIn, closeQuietly, closeUnchecked
public OutputStreamConnectionBytesTransmitter()
public void open(OutputStream aOutputStream) throws IOException
open
in interface org.refcodes.component.ConnectionOpenable<OutputStream>
IOException
public boolean isOpenable(OutputStream aOutputStream)
isOpenable
in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<OutputStream>
public void flush() throws IOException
flush
in interface ByteTransmitter
flush
in interface Flushable
flush
in interface org.refcodes.component.Flushable
IOException
public void close() throws IOException
close
in interface org.refcodes.component.Closable
close
in class org.refcodes.component.AbstractConnectableAutomaton
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.Copyright © 2021. All rights reserved.