public class ByteArray extends Object
| Constructor and Description |
|---|
ByteArray(byte[] bytes) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
通知执行关闭/销毁操作
|
static ByteArray |
createByteArray(String path)
从文件读取一个字节数组
|
protected void |
finalize() |
byte[] |
getBytes()
获取全部字节
|
int |
getLength() |
int |
getOffset() |
boolean |
hasMore() |
boolean |
nextBoolean()
读取一个布尔值
|
byte |
nextByte()
读取一个字节
|
char |
nextChar()
读取一个char,对应于writeChar
|
double |
nextDouble() |
float |
nextFloat() |
int |
nextInt()
读取一个int
|
String |
nextString()
读取一个String,注意这个String是双字节版的,在字符之前有一个整型表示长度
|
int |
nextUnsignedShort()
读取一个无符号短整型
|
String |
nextUTF()
读取一个UTF字符串
|
public static ByteArray createByteArray(String path)
path - public byte[] getBytes()
public int nextInt()
public double nextDouble()
public char nextChar()
public byte nextByte()
public boolean nextBoolean()
public boolean hasMore()
public String nextString()
public float nextFloat()
public int nextUnsignedShort()
public String nextUTF()
public int getOffset()
public int getLength()
public void close()
Copyright © 2014–2021 码农场. All rights reserved.