public class BinaryData extends Object
Modifier and Type | Method and Description |
---|---|
static int |
compare(byte[] b1,
int s1,
byte[] b2,
int s2,
Schema schema)
Compare binary encoded data.
|
static int |
compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2,
Schema schema)
Compare binary encoded data.
|
static int |
compareBytes(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
Lexicographically compare bytes.
|
static int |
encodeBoolean(boolean b,
byte[] buf,
int pos)
Encode a boolean to the byte array at the given position.
|
static int |
encodeDouble(double d,
byte[] buf,
int pos)
Encode a double to the byte array at the given position.
|
static int |
encodeFloat(float f,
byte[] buf,
int pos)
Encode a float to the byte array at the given position.
|
static int |
encodeInt(int n,
byte[] buf,
int pos)
Encode an integer to the byte array at the given position.
|
static int |
encodeLong(long n,
byte[] buf,
int pos)
Encode a long to the byte array at the given position.
|
static int |
hashCode(byte[] bytes,
int start,
int length,
Schema schema)
Hash binary encoded data.
|
static int |
skipLong(byte[] bytes,
int start)
Skip a binary-encoded long, returning the position after it.
|
public static int compare(byte[] b1, int s1, byte[] b2, int s2, Schema schema)
GenericData.compare(Object, Object, Schema)
.public static int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2, Schema schema)
GenericData.compare(Object, Object, Schema)
.public static int compareBytes(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
public static int hashCode(byte[] bytes, int start, int length, Schema schema)
GenericData.hashCode(Object, Schema)
.public static int skipLong(byte[] bytes, int start)
public static int encodeBoolean(boolean b, byte[] buf, int pos)
public static int encodeInt(int n, byte[] buf, int pos)
public static int encodeLong(long n, byte[] buf, int pos)
public static int encodeFloat(float f, byte[] buf, int pos)
public static int encodeDouble(double d, byte[] buf, int pos)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.