org.apache.hadoop.hive.serde2.lazy
Class LazyUtils
java.lang.Object
org.apache.hadoop.hive.serde2.lazy.LazyUtils
public class LazyUtils
- extends Object
Method Summary |
static int |
compare(byte[] b1,
int start1,
int length1,
byte[] b2,
int start2,
int length2)
Returns -1 if the first byte sequence is lexicographically less than the second;
returns +1 if the second byte sequence is lexicographically less than the first;
otherwise return 0. |
static String |
convertToString(byte[] bytes,
int start,
int length)
Convert a UTF-8 byte array to String. |
static int |
digit(int b,
int radix)
Returns the digit represented by character b. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyUtils
public LazyUtils()
digit
public static int digit(int b,
int radix)
- Returns the digit represented by character b.
- Parameters:
b
- The ascii code of the characterradix
- The radix
- Returns:
- -1 if it's invalid
compare
public static int compare(byte[] b1,
int start1,
int length1,
byte[] b2,
int start2,
int length2)
- Returns -1 if the first byte sequence is lexicographically less than the second;
returns +1 if the second byte sequence is lexicographically less than the first;
otherwise return 0.
convertToString
public static String convertToString(byte[] bytes,
int start,
int length)
- Convert a UTF-8 byte array to String.
- Parameters:
bytes
- The byte[] containing the UTF-8 String.start
- The start position inside the bytes.length
- The length of the data, starting from "start"
- Returns:
- The unicode String
Copyright © 2009 The Apache Software Foundation