public class UtpInputStream extends InputStream
DataPayload are being read in order.| Constructor and Description |
|---|
UtpInputStream(UtpSocketImpl socket,
short initialSequenceNumber)
Creates a new inputstream for the given socket.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToBuffer(short sequenceNumber,
DataPayload dataPayload)
Adds the received data payload to the queue of payload to be read.
|
int |
available() |
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
close, mark, markSupported, read, reset, skippublic UtpInputStream(UtpSocketImpl socket, short initialSequenceNumber)
socket - The socket from which the packets will be read.initialSequenceNumber - The sequence number of the first UtpProtocol.ST_DATA packet.public void addToBuffer(short sequenceNumber,
DataPayload dataPayload)
sequenceNumber - The sequence number of the UtpPacket containing the payload.dataPayload - The actual payload.public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class InputStreamIOExceptionpublic int available()
available in class InputStreamCopyright © 2016. All rights reserved.