public class ZOrderingBytesUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZEOF_LONG |
| Constructor and Description |
|---|
ZOrderingBytesUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareTo(byte[] buffer1,
int offset1,
int length1,
byte[] buffer2,
int offset2,
int length2) |
static byte[] |
doubleTo8Byte(double a)
1.先得到byte[]表示。
2.如果是正数,翻转第一个bit
3.如果是负数,翻转所有的bit
此时可以自然排序
|
static byte[] |
interleave8Byte(byte[] buffer1,
byte[] buffer2)
buffer1,buffer2 必须是8字节,最后输出是16字节
buffer2的值在奇数位
|
static byte[] |
interleaveByte(byte x,
byte y)
x在奇数位,y在偶数位
|
static byte[] |
interleaveMulti8Byte(byte[][] buffer) |
static byte[] |
intTo8Byte(int a) |
static byte[] |
longTo8Byte(long a) |
static byte[] |
toBytes(double d) |
static byte[] |
toBytes(int val) |
static byte[] |
toBytes(long val) |
static String |
toString(byte[] b) |
static byte |
updatePos(byte a,
int apos,
byte b,
int bpos) |
static byte[] |
utf8To8Byte(String a) |
public static final int SIZEOF_LONG
public static byte[] toBytes(int val)
public static byte[] toBytes(long val)
public static byte[] intTo8Byte(int a)
public static byte[] longTo8Byte(long a)
public static byte[] toBytes(double d)
public static byte[] doubleTo8Byte(double a)
public static byte[] utf8To8Byte(String a)
public static byte[] interleave8Byte(byte[] buffer1,
byte[] buffer2)
public static byte updatePos(byte a,
int apos,
byte b,
int bpos)
public static byte[] interleaveMulti8Byte(byte[][] buffer)
public static byte[] interleaveByte(byte x,
byte y)
public static String toString(byte[] b)
public static int compareTo(byte[] buffer1,
int offset1,
int length1,
byte[] buffer2,
int offset2,
int length2)
Copyright © 2021. All rights reserved.