-
- All Superinterfaces:
Availability
,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
,ShortDestination
,ShortReceiver
,ShortsDestination
- All Known Subinterfaces:
ConnectionShortsReceiver<CON>
,ConnectionShortsTransceiver<CON>
,ShortsTransceiver
- All Known Implementing Classes:
AbstractShortsReceiver
,LoopbackShortsReceiver
,LoopbackShortsTransceiver
,ShortArrayReceiver
,ShortsReceiverDecorator
public interface ShortsReceiver extends ShortsDestination, ShortReceiver
The Interface ShortsReceiver.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor
org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomaton
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default short[]
receiveAllShorts()
Reads (receives) the all currently available data.default short[]
receiveShorts(int aMaxLength)
Similar toShortsDestination.receiveAllShorts()
though at maximum the amount of data as provided returned.-
Methods inherited from interface org.refcodes.io.Availability
available, hasAvailable
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
-
Methods inherited from interface org.refcodes.io.ShortsDestination
receiveShort, receiveShorts
-
-
-
-
Method Detail
-
receiveAllShorts
default short[] receiveAllShorts() throws IOException
Reads (receives) the all currently available data.- Specified by:
receiveAllShorts
in interfaceShortsDestination
- Returns:
- The next short block sent from the
DatagramsTransmitter
orDatagramReceiver
counterpart. - Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.EOFException
- Signals that an end of file or end of stream has been reached unexpectedly during input.
-
receiveShorts
default short[] receiveShorts(int aMaxLength) throws IOException
Similar toShortsDestination.receiveAllShorts()
though at maximum the amount of data as provided returned.- Specified by:
receiveShorts
in interfaceShortsDestination
- Parameters:
aMaxLength
- 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 methodShortsDestination.receiveAllShorts()
.- Returns:
- The next short block sent from the
DatagramsTransmitter
orDatagramReceiver
counterpart. - Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.EOFException
- Signals that an end of file or end of stream has been reached unexpectedly during input.
-
-