类 DataByteBuffer
- java.lang.Object
-
- cn.mcres.karlatemp.mxlib.util.DataByteBuffer
-
- 所有已实现的接口:
DataInput
,DataOutput
,Function<Consumer<ByteBuffer>,DataByteBuffer>
public class DataByteBuffer extends Object implements DataInput, DataOutput, Function<Consumer<ByteBuffer>,DataByteBuffer>
A DataInput/Output as ByteBuffer 使用ByteBuffer的数据流- 从以下版本开始:
- 2.4
-
-
字段概要
字段 修饰符和类型 字段 说明 static DataByteBuffer
EMPTY
-
构造器概要
构造器 构造器 说明 DataByteBuffer(Buffer buffer)
DataByteBuffer(ByteBuffer buffer)
-
方法概要
修饰符和类型 方法 说明 DataByteBuffer
apply(Consumer<ByteBuffer> apply)
ByteBuffer
getBuffer()
static DataByteBuffer
open(ByteBuffer buffer)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] b)
void
readFully(byte[] b, int off, int len)
int
readInt()
String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
String
readUTF()
int
skipBytes(int n)
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
void
writeBoolean(boolean v)
void
writeByte(int v)
void
writeBytes(String s)
void
writeChar(int v)
void
writeChars(String s)
void
writeDouble(double v)
void
writeFloat(float v)
void
writeInt(int v)
void
writeLong(long v)
void
writeShort(int v)
void
writeUTF(String s)
-
-
-
字段详细资料
-
EMPTY
public static final DataByteBuffer EMPTY
-
-
构造器详细资料
-
DataByteBuffer
public DataByteBuffer(Buffer buffer)
-
DataByteBuffer
public DataByteBuffer(ByteBuffer buffer)
-
-
方法详细资料
-
open
public static DataByteBuffer open(ByteBuffer buffer)
-
apply
public DataByteBuffer apply(Consumer<ByteBuffer> apply)
- 指定者:
apply
在接口中Function<Consumer<ByteBuffer>,DataByteBuffer>
-
readBoolean
public boolean readBoolean()
- 指定者:
readBoolean
在接口中DataInput
-
readUnsignedByte
public int readUnsignedByte()
- 指定者:
readUnsignedByte
在接口中DataInput
-
readUnsignedShort
public int readUnsignedShort()
- 指定者:
readUnsignedShort
在接口中DataInput
-
readDouble
public double readDouble()
- 指定者:
readDouble
在接口中DataInput
-
write
public void write(int b)
- 指定者:
write
在接口中DataOutput
-
write
public void write(@NotNull byte[] b)
- 指定者:
write
在接口中DataOutput
-
write
public void write(@NotNull byte[] b, int off, int len)
- 指定者:
write
在接口中DataOutput
-
writeBoolean
public void writeBoolean(boolean v)
- 指定者:
writeBoolean
在接口中DataOutput
-
writeByte
public void writeByte(int v)
- 指定者:
writeByte
在接口中DataOutput
-
writeShort
public void writeShort(int v)
- 指定者:
writeShort
在接口中DataOutput
-
writeChar
public void writeChar(int v)
- 指定者:
writeChar
在接口中DataOutput
-
writeInt
public void writeInt(int v)
- 指定者:
writeInt
在接口中DataOutput
-
writeLong
public void writeLong(long v)
- 指定者:
writeLong
在接口中DataOutput
-
writeFloat
public void writeFloat(float v)
- 指定者:
writeFloat
在接口中DataOutput
-
writeDouble
public void writeDouble(double v)
- 指定者:
writeDouble
在接口中DataOutput
-
writeBytes
public void writeBytes(@NotNull String s)
- 指定者:
writeBytes
在接口中DataOutput
-
writeChars
public void writeChars(@NotNull String s)
- 指定者:
writeChars
在接口中DataOutput
-
writeUTF
public void writeUTF(@NotNull String s)
- 指定者:
writeUTF
在接口中DataOutput
-
getBuffer
public ByteBuffer getBuffer()
-
-