public class BaseEncoderImpl extends org.refcodes.component.AbstractConnectableAutomaton implements BaseEncoder
BaseEncoder interface to be used
with ByteSender instances.| Modifier and Type | Class and Description |
|---|---|
static class |
BaseEncoderImpl.BaseEncoderConsumerImpl
Vanilla plain implementation of the
BaseEncoderConsumer interface
to be used with ByteConsumer (ByteSender) instances. |
BaseEncoder.BaseEncoderConsumerBaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<B extends BaseMetricsAccessor.BaseMetricsBuilder<B>>, BaseMetricsAccessor.BaseMetricsMutatororg.refcodes.component.ConnectableComponent.ConnectableAutomatonorg.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedPropertyorg.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| Modifier | Constructor and Description |
|---|---|
protected |
BaseEncoderImpl()
Explicit default constructor.
|
|
BaseEncoderImpl(org.refcodes.io.ByteConsumer aByteConsumer)
Constructs the
BaseEncoder instance using the provided
ByteConsumer to receive the encoded data. |
|
BaseEncoderImpl(org.refcodes.io.ByteSender aByteSender)
Constructs the
BaseEncoder instance using the provided
ByteSender to receive the encoded data. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
BaseMetrics |
getBaseMetrics()
Retrieves the base codec metrics from the base codec metrics property.
|
protected void |
open(org.refcodes.io.ByteConsumer aConnection)
Open.
|
void |
setBaseMetrics(BaseMetrics aBaseMetrics)
Sets the base codec metrics for the base codec metrics property.
|
BaseEncoder |
withBaseMetrics(BaseMetrics _baseCodecMetrics)
Sets the base codec metrics for the base codec metrics property.
|
void |
writeDatagram(byte aDatagram) |
void |
writeDatagrams(byte[] aDatagram) |
void |
writeDatagrams(byte[] aDatagram,
int aOffset,
int aLength) |
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseIn, closeQuietly, closeUncheckedpublic BaseEncoderImpl(org.refcodes.io.ByteConsumer aByteConsumer)
BaseEncoder instance using the provided
ByteConsumer to receive the encoded data.aByteConsumer - The ByteConsumer to be fed with the encoded
data.public BaseEncoderImpl(org.refcodes.io.ByteSender aByteSender)
throws org.refcodes.component.OpenException
BaseEncoder instance using the provided
ByteSender to receive the encoded data.aByteSender - The ByteSender to be fed with the encoded
data.org.refcodes.component.OpenException - 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 writeDatagram(byte aDatagram)
throws org.refcodes.component.OpenException
writeDatagram in interface org.refcodes.io.ByteConsumerwriteDatagram in interface org.refcodes.io.ByteDatagramConsumerorg.refcodes.component.OpenExceptionpublic void writeDatagrams(byte[] aDatagram)
throws org.refcodes.component.OpenException
writeDatagrams in interface org.refcodes.io.ByteBlockConsumerwriteDatagrams in interface org.refcodes.io.ByteConsumerorg.refcodes.component.OpenExceptionpublic void writeDatagrams(byte[] aDatagram,
int aOffset,
int aLength)
throws org.refcodes.component.OpenException
writeDatagrams in interface org.refcodes.io.ByteBlockConsumerwriteDatagrams in interface org.refcodes.io.ByteSenderorg.refcodes.component.OpenExceptionpublic void flush()
throws org.refcodes.component.OpenException
public void close()
throws org.refcodes.component.CloseException
close in interface org.refcodes.component.Closableclose in class org.refcodes.component.AbstractConnectableAutomatonorg.refcodes.component.CloseExceptionprotected void open(org.refcodes.io.ByteConsumer aConnection)
throws org.refcodes.component.OpenException
aConnection - the connectionorg.refcodes.component.OpenException - the open exceptionCopyright © 2018. All rights reserved.