BaseDecoder
, BaseMetricsAccessor
, BaseMetricsAccessor.BaseCodecMetricsProperty
, BaseMetricsAccessor.BaseMetricsBuilder<BaseDecoder>
, BaseMetricsAccessor.BaseMetricsMutator
, Decoder
, 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.OpenedAccessor
, org.refcodes.io.Availability
, org.refcodes.io.ByteDestination
, org.refcodes.io.ByteReceiver
, org.refcodes.io.BytesDestination
, org.refcodes.io.BytesReceiver
, org.refcodes.io.Receivable
, org.refcodes.io.Skippable
, org.refcodes.io.TimeoutInputStreamAccessor
, org.refcodes.mixin.InputStreamAccessor
BaseDecoderImpl.BaseDecoderConnectionImpl
, BaseInputStreamDecoder
public class BaseDecoderImpl extends org.refcodes.component.AbstractConnectableAutomaton implements BaseDecoder
BaseDecoder
interface to be used
with BytesReceiver
instances.Modifier and Type | Class | Description |
---|---|---|
static class |
BaseDecoderImpl.BaseDecoderConnectionImpl |
Vanilla plain implementation of the
BaseDecoder.BaseDecoderConnection
interface to be used with BytesDestination
(BytesReceiver ) instances. |
BaseDecoder.BaseDecoderConnection
BaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<B extends BaseMetricsAccessor.BaseMetricsBuilder<B>>, BaseMetricsAccessor.BaseMetricsMutator
org.refcodes.io.BytesReceiver.ReceiverInputStream
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.mixin.InputStreamAccessor.InputStreamBuilder<B extends org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<?>>, org.refcodes.mixin.InputStreamAccessor.InputStreamMutator, org.refcodes.mixin.InputStreamAccessor.InputStreamProperty
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<B extends org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<?>>, org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamMutator, org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamProperty
Modifier | Constructor | Description |
---|---|---|
protected |
BaseDecoderImpl() |
Explicit default constructor.
|
|
BaseDecoderImpl(org.refcodes.io.BytesDestination aByteProvider) |
Constructs the
BaseDecoder reading the data to be decoded from
the provided BytesDestination . |
|
BaseDecoderImpl(org.refcodes.io.BytesReceiver aByteReceiver) |
Constructs the
BaseDecoder reading the data to be decoded from
the provided BytesReceiver . |
Modifier and Type | Method | Description |
---|---|---|
int |
available() |
|
void |
close() |
|
BaseMetrics |
getBaseMetrics() |
Retrieves the base codec metrics from the base codec metrics property.
|
protected void |
open(org.refcodes.io.BytesDestination aConnection) |
Open.
|
byte[] |
receiveAllBytes() |
|
byte |
receiveByte() |
|
void |
setBaseMetrics(BaseMetrics aBaseMetrics) |
Sets the base codec metrics for the base codec metrics property.
|
BaseDecoder |
withBaseMetrics(BaseMetrics aBaseMetrics) |
Sets the base codec metrics for the base codec metrics property.
|
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
letBaseMetrics
getInputStream, getInputStream, receiveBytes, receiveBytesWithin, receiveBytesWithin, receiveByteWithin, skip
closeIn, closeQuietly, closeUnchecked
getConnectionStatus, isOpened
public BaseDecoderImpl(org.refcodes.io.BytesDestination aByteProvider)
BaseDecoder
reading the data to be decoded from
the provided BytesDestination
.aByteProvider
- The BytesDestination
from which to read the
data.public BaseDecoderImpl(org.refcodes.io.BytesReceiver aByteReceiver) throws IOException
BaseDecoder
reading the data to be decoded from
the provided BytesReceiver
.aByteReceiver
- The BytesReceiver
from which to read the
data.IOException
- in case opening or accessing an open line
(connection, junction, link) caused problems.protected BaseDecoderImpl()
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 BaseDecoder withBaseMetrics(BaseMetrics aBaseMetrics)
withBaseMetrics
in interface BaseMetricsAccessor.BaseMetricsBuilder<BaseDecoder>
aBaseMetrics
- The base codec metrics to be stored by the font
style property.public int available() throws IOException
available
in interface org.refcodes.io.Availability
available
in interface org.refcodes.io.Skippable
IOException
public byte[] receiveAllBytes() throws IOException
receiveAllBytes
in interface org.refcodes.io.BytesDestination
receiveAllBytes
in interface org.refcodes.io.BytesReceiver
IOException
public byte receiveByte() throws IOException
receiveByte
in interface org.refcodes.io.ByteDestination
receiveByte
in interface org.refcodes.io.BytesDestination
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.BytesDestination aConnection) throws IOException
aConnection
- the connectionIOException
- the open exceptionCopyright © 2021. All rights reserved.