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.OutputStreamAccessorBaseEncoderImpl.BaseEncoderConnectionImpl, BaseOutputStreamEncoderpublic 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.BaseEncoderConnectionBaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<B extends BaseMetricsAccessor.BaseMetricsBuilder<B>>, BaseMetricsAccessor.BaseMetricsMutatororg.refcodes.io.BytesTransmitter.TransmitterOutputStreamorg.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.ClosedPropertyorg.refcodes.component.ConnectableComponent.ConnectableAutomatonorg.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusPropertyorg.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedPropertyorg.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, setConnectionStatusletBaseMetricscloseIn, closeQuietly, closeUncheckedpublic 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 BaseMetricsAccessorpublic void setBaseMetrics(BaseMetrics aBaseMetrics)
setBaseMetrics in interface BaseMetricsAccessor.BaseMetricsMutatoraBaseMetrics - 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.ByteSourcetransmitByte in interface org.refcodes.io.BytesSourceIOExceptionpublic void transmitAllBytes(byte[] aDatagram)
throws IOException
transmitAllBytes in interface org.refcodes.io.BytesSourceIOExceptionpublic void transmitBytes(byte[] aDatagram,
int aOffset,
int aLength)
throws IOException
transmitBytes in interface org.refcodes.io.BytesSourcetransmitBytes in interface org.refcodes.io.BytesTransmitterIOExceptionpublic void flush()
throws IOException
flush in interface org.refcodes.io.ByteTransmitterflush in interface Flushableflush in interface org.refcodes.component.FlushableIOExceptionpublic void close()
throws IOException
close in interface org.refcodes.component.Closableclose in class org.refcodes.component.AbstractConnectableAutomatonIOExceptionprotected void open(org.refcodes.io.BytesSource aConnection)
throws IOException
aConnection - the connectionIOException - the open exceptionCopyright © 2021. All rights reserved.