java.io.Closeable, java.lang.AutoCloseable@Private
public class PacketReceiver
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field | Description |
|---|---|---|
static int |
MAX_PACKET_SIZE |
The max size of any single packet.
|
| Constructor | Description |
|---|---|
PacketReceiver(boolean useDirectBuffers) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
protected void |
finalize() |
|
java.nio.ByteBuffer |
getChecksumSlice() |
|
java.nio.ByteBuffer |
getDataSlice() |
|
PacketHeader |
getHeader() |
|
void |
mirrorPacketTo(java.io.DataOutputStream mirrorOut) |
Rewrite the last-read packet on the wire to the given output stream.
|
void |
receiveNextPacket(java.io.InputStream in) |
|
void |
receiveNextPacket(java.nio.channels.ReadableByteChannel in) |
Reads all of the data for the next packet into the appropriate buffers.
|
public static final int MAX_PACKET_SIZE
public PacketHeader getHeader()
public java.nio.ByteBuffer getDataSlice()
public java.nio.ByteBuffer getChecksumSlice()
public void receiveNextPacket(java.nio.channels.ReadableByteChannel in)
throws java.io.IOException
java.io.IOExceptionpublic void receiveNextPacket(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionreceiveNextPacket(ReadableByteChannel)public void mirrorPacketTo(java.io.DataOutputStream mirrorOut)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableCopyright © 2008–2025 Apache Software Foundation. All rights reserved.