Flushable
, BaseEncoder
, BaseMetricsAccessor
, BaseMetricsAccessor.BaseCodecMetricsProperty
, BaseMetricsAccessor.BaseMetricsBuilder<BaseEncoder>
, BaseMetricsAccessor.BaseMetricsMutator
, Encoder
, 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
, org.refcodes.io.ByteSource
, org.refcodes.io.BytesSource
, org.refcodes.io.BytesTransmitter
, org.refcodes.io.ByteTransmitter
, org.refcodes.io.Transmittable
, org.refcodes.mixin.OutputStreamAccessor
BaseEncoderImpl.BaseEncoderConnectionImpl
, BaseOutputStreamEncoder
public class BaseEncoderImpl extends org.refcodes.component.AbstractConnectableAutomaton implements BaseEncoder
BaseEncoder
interface to be used
with BytesTransmitter
instances.Modifier and Type | Class | Description |
---|---|---|
static class |
BaseEncoderImpl.BaseEncoderConnectionImpl |
Vanilla plain implementation of the
BaseEncoder.BaseEncoderConnection
interface to be used with BytesSource (BytesTransmitter )
instances. |
BaseEncoder.BaseEncoderConnection
BaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<B extends BaseMetricsAccessor.BaseMetricsBuilder<B>>, BaseMetricsAccessor.BaseMetricsMutator
org.refcodes.io.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
Modifier | Constructor | Description |
---|---|---|
protected |
BaseEncoderImpl() |
Explicit default constructor.
|
|
BaseEncoderImpl(org.refcodes.io.BytesSource aByteConsumer) |
Constructs the
BaseEncoder instance using the provided
BytesSource to receive the encoded data. |
|
BaseEncoderImpl(org.refcodes.io.BytesTransmitter aByteSender) |
Constructs the
BaseEncoder instance using the provided
BytesTransmitter to receive the encoded data. |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
BaseMetrics |
getBaseMetrics() |
Retrieves the base codec metrics from the base codec metrics property.
|
protected void |
open(org.refcodes.io.BytesSource aConnection) |
Open.
|
void |
setBaseMetrics(BaseMetrics aBaseMetrics) |
Sets the base codec metrics for the base codec metrics property.
|
void |
transmitAllBytes(byte[] aDatagram) |
|
void |
transmitByte(byte aByte) |
|
void |
transmitBytes(byte[] aDatagram,
int aOffset,
int aLength) |
|
BaseEncoder |
withBaseMetrics(BaseMetrics _baseCodecMetrics) |
Sets the base codec metrics for the base codec metrics property.
|
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
letBaseMetrics
closeIn, closeQuietly, closeUnchecked
public BaseEncoderImpl(org.refcodes.io.BytesSource aByteConsumer)
BaseEncoder
instance using the provided
BytesSource
to receive the encoded data.aByteConsumer
- The BytesSource
to be fed with the encoded
data.public BaseEncoderImpl(org.refcodes.io.BytesTransmitter aByteSender) throws IOException
BaseEncoder
instance using the provided
BytesTransmitter
to receive the encoded data.aByteSender
- The BytesTransmitter
to be fed with the
encoded data.IOException
- in case opening or accessing an open line
(connection, junction, link) caused problems.protected BaseEncoderImpl()
public BaseMetrics getBaseMetrics()
getBaseMetrics
in interface BaseMetricsAccessor
public void setBaseMetrics(BaseMetrics aBaseMetrics)
setBaseMetrics
in interface BaseMetricsAccessor.BaseMetricsMutator
aBaseMetrics
- The base codec metrics to be stored by the font
style property.public BaseEncoder withBaseMetrics(BaseMetrics _baseCodecMetrics)
withBaseMetrics
in interface BaseMetricsAccessor.BaseMetricsBuilder<BaseEncoder>
_baseCodecMetrics
- The base codec metrics to be stored by the font
style property.public void transmitByte(byte aByte) throws IOException
transmitByte
in interface org.refcodes.io.ByteSource
transmitByte
in interface org.refcodes.io.BytesSource
IOException
public void transmitAllBytes(byte[] aDatagram) throws IOException
transmitAllBytes
in interface org.refcodes.io.BytesSource
IOException
public void transmitBytes(byte[] aDatagram, int aOffset, int aLength) throws IOException
transmitBytes
in interface org.refcodes.io.BytesSource
transmitBytes
in interface org.refcodes.io.BytesTransmitter
IOException
public void flush() throws IOException
flush
in interface org.refcodes.io.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
protected void open(org.refcodes.io.BytesSource aConnection) throws IOException
aConnection
- the connectionIOException
- the open exceptionCopyright © 2021. All rights reserved.