ByteBlockProvider, ByteBlockReceiver, ByteDatagramProvider, ByteDatagramReceiver, ByteProvider, 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, Receivable, org.refcodes.mixin.ReleaseableBidirectionalConnectionByteTransceiver<INPUT,OUTPUT>, BidirectionalStreamConnectionByteTransceiver, ByteArrayReceiver, ByteTransceiver, ConnectionByteReceiver<CON>, ConnectionByteTransceiver<CON>, InputStreamConnectionByteReceiver, LoopbackByteReceiver, LoopbackByteTransceiverAbstractByteReceiver, AbstractInputStreamByteReceiver, AbstractPrefetchInputStreamByteReceiver, BidirectionalStreamByteTransceiverImpl, BidirectionalStreamConnectionByteTransceiverImpl, ByteArrayReceiverImpl, ByteReceiverDecorator, InputStreamByteReceiverImpl, InputStreamConnectionByteReceiverImpl, LoopbackByteReceiverImpl, LoopbackByteTransceiverImpl, PrefetchBidirectionalStreamByteTransceiverImpl, PrefetchBidirectionalStreamConnectionByteTransceiverImpl, PrefetchInputStreamByteReceiverImpl, PrefetchInputStreamConnectionByteReceiverImplpublic interface ByteReceiver extends ByteProvider, ByteDatagramReceiver, ByteBlockReceiver
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.ClosedPropertyorg.refcodes.component.ConnectableComponent.ConnectableAutomaton| Modifier and Type | Method | Description |
|---|---|---|
default byte[] |
readDatagrams() |
Caution: Reads till an
OpenException (or an
InterruptedException in case of blocking till more data is
available) occurs. |
default byte[] |
readDatagrams(int aBlockSize) |
Similar to
ByteBlockProvider.readDatagrams() though at maximum the amount of data
as provided by the block-size is returned. |
readDatagramclose, closeIn, closeQuietly, closeUncheckedgetConnectionStatus, isConnectionOpenedhasDatagramdefault byte[] readDatagrams()
throws org.refcodes.component.OpenException,
InterruptedException
OpenException (or an
InterruptedException in case of blocking till more data is
available) occurs.
Reads (receives) the next byte block passed from a BlockSender or
DatagramSender counterpart. In case none byte block is available,
then this method blocks until one is available.
When a Thread is waiting for a byte to be read and
Thread.interrupt() is being called, then the operation is aborted
and an InterruptedException is thrown.readDatagrams in interface ByteBlockProviderreadDatagrams in interface ByteProviderBlockSender or
DatagramReceiver counterpart.org.refcodes.component.OpenException - Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.InterruptedException - Thrown when a Thread is waiting,
sleeping, or otherwise occupied, and the Thread is
interrupted, either before or during the activity.default byte[] readDatagrams(int aBlockSize)
throws org.refcodes.component.OpenException,
InterruptedException
ByteBlockProvider.readDatagrams() though at maximum the amount of data
as provided by the block-size is returned.readDatagrams in interface ByteBlockProviderreadDatagrams in interface ByteProvideraBlockSize - The block-size which is not to exceeded by the returned
data. A value of -1 specifies to retrieve all available datagrams
(same behavior as method ByteBlockProvider.readDatagrams().BlockSender or
DatagramReceiver counterpart.org.refcodes.component.OpenException - Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.InterruptedException - Thrown when a Thread is waiting,
sleeping, or otherwise occupied, and the Thread is
interrupted, either before or during the activity.Copyright © 2018. All rights reserved.