public static class UnsynchronizedBuffer.Reader extends Object
Constructor and Description |
---|
UnsynchronizedBuffer.Reader(byte[] b)
Creates a new reader.
|
UnsynchronizedBuffer.Reader(ByteBuffer buffer)
Creates a new reader.
|
Modifier and Type | Method and Description |
---|---|
boolean |
readBoolean()
Reads a Boolean value from this reader's buffer.
|
void |
readBytes(byte[] b)
Reads bytes from this reader's buffer, filling the given byte array.
|
int |
readInt()
Reads an integer value from this reader's buffer.
|
long |
readLong()
Reads a long value from this reader's buffer.
|
int |
readVInt()
Reads an integer value from this reader's buffer, assuming the integer was encoded as a variable-length list of bytes.
|
long |
readVLong()
Reads a long value from this reader's buffer, assuming the long was encoded as a variable-length list of bytes.
|
public UnsynchronizedBuffer.Reader(byte[] b)
b
- bytes to readpublic UnsynchronizedBuffer.Reader(ByteBuffer buffer)
buffer
- byte buffer containing bytes to readpublic int readInt()
public long readLong()
public void readBytes(byte[] b)
b
- byte array to fillpublic boolean readBoolean()
public int readVInt()
public long readVLong()
Copyright © 2011–2016 The Apache Software Foundation. All rights reserved.