public final class RawPacket extends Object
| Constructor and Description |
|---|
RawPacket(ByteBuffer byteBuffer,
int packetSeq)
create a raw stream.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
getByteBuffer()
Get the byte buffer backing this stream.
|
int |
getPacketSeq()
Get the package sequence number.
|
static ByteBuffer |
nextBuffer(InputStream is,
byte[] headerBuffer,
byte[] reusableBuffer)
Get the next stream from the stream
|
static RawPacket |
nextPacket(InputStream is,
byte[] headerBuffer,
byte[] reusableBuffer)
Fetch next stream.
|
public RawPacket(ByteBuffer byteBuffer, int packetSeq)
byteBuffer - the byte buffer containing the streampacketSeq - the stream sequencepublic static ByteBuffer nextBuffer(InputStream is, byte[] headerBuffer, byte[] reusableBuffer) throws IOException
is - the input stream to read the next stream fromheaderBuffer - reusable headBufferreusableBuffer - reusable main bufferIOException - if an error occurs while reading datapublic static RawPacket nextPacket(InputStream is, byte[] headerBuffer, byte[] reusableBuffer) throws IOException
is - inputStreamheaderBuffer - reusable headBufferreusableBuffer - reusable main bufferIOException - if a connection error occurpublic ByteBuffer getByteBuffer()
public int getPacketSeq()
Copyright © 2016. All rights reserved.