|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.corpus.io.ByteArray
public class ByteArray
对字节数组进行封装,提供方便的读取操作
| 构造方法摘要 | |
|---|---|
ByteArray(byte[] bytes)
|
|
| 方法摘要 | |
|---|---|
static ByteArray |
createByteArray(String path)
从文件读取一个字节数组 |
byte[] |
getBytes()
获取全部字节 |
int |
getLength()
|
int |
getOffset()
|
boolean |
hasMore()
|
byte |
nextByte()
读取一个字节 |
char |
nextChar()
读取一个char,对应于writeChar |
double |
nextDouble()
|
float |
nextFloat()
|
int |
nextInt()
读取一个int |
String |
nextString()
读取一个String,注意这个String是双字节版的,在字符之前有一个整型表示长度 |
int |
nextUnsignedShort()
读取一个无符号短整型 |
String |
nextUTF()
读取一个UTF字符串 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ByteArray(byte[] bytes)
| 方法详细信息 |
|---|
public static ByteArray createByteArray(String path)
path -
public byte[] getBytes()
public int nextInt()
public double nextDouble()
public char nextChar()
public byte nextByte()
public boolean hasMore()
public String nextString()
public float nextFloat()
public int nextUnsignedShort()
public String nextUTF()
public int getOffset()
public int getLength()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||