|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.file.tfile.Utils
public final class Utils
Supporting Utility classes used by TFile, and shared by users of TFile.
| Nested Class Summary | |
|---|---|
static class |
Utils.Version
A generic Version class. |
| Method Summary | ||
|---|---|---|
static
|
lowerBound(java.util.List<? extends java.lang.Comparable<? super T>> list,
T key)
Lower bound binary search. |
|
static
|
lowerBound(java.util.List<? extends T> list,
T key,
java.util.Comparator<? super T> cmp)
Lower bound binary search. |
|
static java.lang.String |
readString(java.io.DataInput in)
Read a String as a VInt n, followed by n Bytes in Text format. |
|
static int |
readVInt(java.io.DataInput in)
Decoding the variable-length integer. |
|
static long |
readVLong(java.io.DataInput in)
Decoding the variable-length integer. |
|
static
|
upperBound(java.util.List<? extends java.lang.Comparable<? super T>> list,
T key)
Upper bound binary search. |
|
static
|
upperBound(java.util.List<? extends T> list,
T key,
java.util.Comparator<? super T> cmp)
Upper bound binary search. |
|
static void |
writeString(java.io.DataOutput out,
java.lang.String s)
Write a String as a VInt n, followed by n Bytes as in Text format. |
|
static void |
writeVInt(java.io.DataOutput out,
int n)
Encoding an integer into a variable-length encoding format. |
|
static void |
writeVLong(java.io.DataOutput out,
long n)
Encoding a Long integer into a variable-length encoding format. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void writeVInt(java.io.DataOutput out,
int n)
throws java.io.IOException
Utils#writeVLong(out, n).
out - output streamn - The integer to be encoded
java.io.IOExceptionwriteVLong(DataOutput, long)
public static void writeVLong(java.io.DataOutput out,
long n)
throws java.io.IOException
out - output streamn - the integer number
java.io.IOException
public static int readVInt(java.io.DataInput in)
throws java.io.IOException
(int)Utils#readVLong(in).
in - input stream
java.io.IOExceptionreadVLong(DataInput)
public static long readVLong(java.io.DataInput in)
throws java.io.IOException
in - input stream
java.io.IOException
public static void writeString(java.io.DataOutput out,
java.lang.String s)
throws java.io.IOException
out - s -
java.io.IOException
public static java.lang.String readString(java.io.DataInput in)
throws java.io.IOException
in - The input stream.
java.io.IOException
public static <T> int lowerBound(java.util.List<? extends T> list,
T key,
java.util.Comparator<? super T> cmp)
T - Type of the input key.list - The listkey - The input key.cmp - Comparator for the key.
public static <T> int upperBound(java.util.List<? extends T> list,
T key,
java.util.Comparator<? super T> cmp)
T - Type of the input key.list - The listkey - The input key.cmp - Comparator for the key.
public static <T> int lowerBound(java.util.List<? extends java.lang.Comparable<? super T>> list,
T key)
T - Type of the input key.list - The listkey - The input key.
public static <T> int upperBound(java.util.List<? extends java.lang.Comparable<? super T>> list,
T key)
T - Type of the input key.list - The listkey - The input key.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||