@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
IOException
public void receiveNextPacket(InputStream in) throws IOException
IOException
receiveNextPacket(ReadableByteChannel)
public void mirrorPacketTo(DataOutputStream mirrorOut) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2013 Apache Software Foundation. All rights reserved.