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 int getKeyLength()
public void get(BytesWritable key, BytesWritable value) throws IOException
key - BytesWritable to hold key.value - BytesWritable to hold valueIOExceptionpublic int getKey(BytesWritable key) throws IOException
key - BytesWritable to hold the key.IOExceptionpublic long getValue(BytesWritable value) throws IOException
value - IOExceptionpublic int writeKey(OutputStream out) throws IOException
out - The output streamIOExceptionpublic long writeValue(OutputStream out) throws IOException
out - The output streamIOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic DataInputStream getKeyStream()
public int getValueLength()
public int getValue(byte[] buf)
throws IOException
getValue(byte[]), getValue(byte[], int),
getValueStream().IOExceptionpublic int getValue(byte[] buf,
int offset)
throws IOException
getValue(byte[]), getValue(byte[], int),
getValueStream().IOExceptionpublic DataInputStream getValueStream() throws IOException
getValue(byte[]),
getValue(byte[], int), getValueStream().IOExceptionpublic 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 © 2019 Apache Software Foundation. All Rights Reserved.