@InterfaceAudience.Private public class PacketReceiver extends Object implements Closeable
| Constructor and Description |
|---|
PacketReceiver(boolean useDirectBuffers) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
finalize() |
ByteBuffer |
getChecksumSlice() |
ByteBuffer |
getDataSlice() |
PacketHeader |
getHeader() |
void |
mirrorPacketTo(DataOutputStream mirrorOut)
Rewrite the last-read packet on the wire to the given output stream.
|
void |
receiveNextPacket(InputStream in) |
void |
receiveNextPacket(ReadableByteChannel in)
Reads all of the data for the next packet into the appropriate buffers.
|
public PacketHeader getHeader()
public ByteBuffer getDataSlice()
public ByteBuffer getChecksumSlice()
public void receiveNextPacket(ReadableByteChannel in) throws IOException
IOExceptionpublic void receiveNextPacket(InputStream in) throws IOException
IOExceptionreceiveNextPacket(ReadableByteChannel)public void mirrorPacketTo(DataOutputStream mirrorOut) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2013 Apache Software Foundation. All rights reserved.