public class TFile.Reader.Scanner.Entry extends Object implements Comparable<RawComparable>
Constructor and Description |
---|
TFile.Reader.Scanner.Entry() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(byte[] buf)
Compare the entry key to another key.
|
int |
compareTo(byte[] buf,
int offset,
int length)
Compare the entry key to another key.
|
int |
compareTo(RawComparable key)
Compare an entry with a RawComparable object.
|
boolean |
equals(Object other)
Compare whether this and other points to the same key value.
|
void |
get(BytesWritable key,
BytesWritable value)
Copy the key and value in one shot into BytesWritables.
|
int |
getKey(byte[] buf)
Copy the key into user supplied buffer.
|
int |
getKey(byte[] buf,
int offset)
Copy the key into user supplied buffer.
|
int |
getKey(BytesWritable key)
Copy the key into BytesWritable.
|
int |
getKeyLength()
Get the length of the key.
|
DataInputStream |
getKeyStream()
Streaming access to the key.
|
int |
getValue(byte[] buf)
Copy value into user-supplied buffer.
|
int |
getValue(byte[] buf,
int offset)
Copy value into user-supplied buffer.
|
long |
getValue(BytesWritable value)
Copy the value into BytesWritable.
|
int |
getValueLength()
Get the length of the value.
|
DataInputStream |
getValueStream()
Stream access to value.
|
int |
hashCode() |
boolean |
isValueLengthKnown()
Check whether it is safe to call getValueLength().
|
int |
writeKey(OutputStream out)
Writing the key to the output stream.
|
long |
writeValue(OutputStream out)
Writing the value to the output stream.
|
public TFile.Reader.Scanner.Entry()
public int getKeyLength()
public void get(BytesWritable key, BytesWritable value) throws IOException
key
- BytesWritable to hold key.value
- BytesWritable to hold valueIOException
public int getKey(BytesWritable key) throws IOException
key
- BytesWritable to hold the key.IOException
public long getValue(BytesWritable value) throws IOException
value
- IOException
public int writeKey(OutputStream out) throws IOException
out
- The output streamIOException
public long writeValue(OutputStream out) throws IOException
out
- The output streamIOException
public int getKey(byte[] buf) throws IOException
buf
- The buffer supplied by user. The length of the buffer must
not be shorter than the key length.IOException
public int getKey(byte[] buf, int offset) throws IOException
buf
- The buffer supplied by user.offset
- The starting offset of the user buffer where we should copy
the key into. Requiring the key-length + offset no greater
than the buffer length.IOException
public DataInputStream getKeyStream()
public int getValueLength()
public int getValue(byte[] buf) throws IOException
getValue(byte[])
, getValue(byte[], int)
,
getValueStream()
.IOException
public int getValue(byte[] buf, int offset) throws IOException
getValue(byte[])
, getValue(byte[], int)
,
getValueStream()
.IOException
public DataInputStream getValueStream() throws IOException
getValue(byte[])
,
getValue(byte[], int)
, getValueStream()
.IOException
public boolean isValueLengthKnown()
public int compareTo(byte[] buf)
buf
- The key buffer.public int compareTo(byte[] buf, int offset, int length)
buf
- The key bufferoffset
- offset into the key buffer.length
- the length of the key.public int compareTo(RawComparable key)
compareTo
in interface Comparable<RawComparable>
public boolean equals(Object other)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.