@FunctionalInterface public interface ByteProvider extends ByteDatagramProvider, ByteBlockProvider
Modifier and Type | Method and 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. |
readDatagram
default byte[] readDatagrams() throws org.refcodes.component.OpenException, InterruptedException
OpenException
(or an
InterruptedException
in case of blocking till more data is
available) occurs.readDatagrams
in interface ByteBlockProvider
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.default byte[] readDatagrams(int aBlockSize) throws org.refcodes.component.OpenException, InterruptedException
ByteBlockProvider
ByteBlockProvider.readDatagrams()
though at maximum the amount of data
as provided by the block-size is returned.readDatagrams
in interface ByteBlockProvider
aBlockSize
- 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 © 2017. All rights reserved.