public class BufferUtil extends Object
Constructor and Description |
---|
BufferUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getLength(byte[] src) |
static int |
getLength(long length) |
static void |
move(int i,
ByteBuffer buffer) |
static void |
position(int i,
ByteBuffer buffer) |
static byte |
read(ByteBuffer buffer) |
static Date |
readDate(ByteBuffer buffer) |
static double |
readDouble(ByteBuffer buffer) |
static float |
readFloat(ByteBuffer buffer) |
static int |
readInt(ByteBuffer buffer) |
static long |
readLong(ByteBuffer buffer)
8个字节
|
static String |
readString(ByteBuffer buffer) |
static String |
readString(ByteBuffer buffer,
int length,
String charset)
读取指定长度的String
|
static String |
readString(ByteBuffer buffer,
String charset) |
static String |
readStringWithNull(ByteBuffer buffer) |
static String |
readStringWithNull(ByteBuffer buffer,
String charset) |
static Time |
readTime(ByteBuffer buffer) |
static int |
readUB2(ByteBuffer buffer) |
static int |
readUB3(ByteBuffer buffer) |
static long |
readUB4(ByteBuffer buffer) |
static void |
writeDouble(ByteBuffer buffer,
double d) |
static void |
writeFloat(ByteBuffer buffer,
float f) |
static void |
writeInt(ByteBuffer buffer,
int i) |
static void |
writeLength(ByteBuffer buffer,
long l) |
static void |
writeLong(ByteBuffer buffer,
long l) |
static void |
writeUB2(ByteBuffer buffer,
int i) |
static void |
writeUB3(ByteBuffer buffer,
int i) |
static void |
writeUB4(ByteBuffer buffer,
long l) |
static void |
writeWithLength(ByteBuffer buffer,
byte[] src) |
static void |
writeWithLength(ByteBuffer buffer,
byte[] src,
byte nullValue) |
static void |
writeWithNull(ByteBuffer buffer,
byte[] src) |
public static byte read(ByteBuffer buffer)
public static int readUB2(ByteBuffer buffer)
public static int readUB3(ByteBuffer buffer)
public static long readUB4(ByteBuffer buffer)
public static int readInt(ByteBuffer buffer)
public static float readFloat(ByteBuffer buffer)
public static long readLong(ByteBuffer buffer)
buffer
- public static double readDouble(ByteBuffer buffer)
public static String readString(ByteBuffer buffer)
public static String readString(ByteBuffer buffer, String charset)
public static String readStringWithNull(ByteBuffer buffer, String charset)
public static String readString(ByteBuffer buffer, int length, String charset)
buffer
- length
- charset
- public static String readStringWithNull(ByteBuffer buffer)
public static Time readTime(ByteBuffer buffer)
public static Date readDate(ByteBuffer buffer)
public static void move(int i, ByteBuffer buffer)
public static void position(int i, ByteBuffer buffer)
public static final void writeUB2(ByteBuffer buffer, int i)
public static final void writeUB3(ByteBuffer buffer, int i)
public static final void writeInt(ByteBuffer buffer, int i)
public static final void writeFloat(ByteBuffer buffer, float f)
public static final void writeUB4(ByteBuffer buffer, long l)
public static final void writeLong(ByteBuffer buffer, long l)
public static final void writeDouble(ByteBuffer buffer, double d)
public static final void writeLength(ByteBuffer buffer, long l)
public static final void writeWithNull(ByteBuffer buffer, byte[] src)
public static final void writeWithLength(ByteBuffer buffer, byte[] src)
public static final void writeWithLength(ByteBuffer buffer, byte[] src, byte nullValue)
public static final int getLength(long length)
public static final int getLength(byte[] src)
Copyright © 2018. All rights reserved.