com.hankcs.hanlp.corpus.io
类 ByteArrayStream

java.lang.Object
  继承者 com.hankcs.hanlp.corpus.io.ByteArray
      继承者 com.hankcs.hanlp.corpus.io.ByteArrayStream

public class ByteArrayStream
extends ByteArray

流式的字节数组,降低读取时的内存峰值

作者:
hankcs

构造方法摘要
ByteArrayStream(byte[] bytes, int bufferSize, FileChannel fileChannel)
           
 
方法摘要
static ByteArrayStream createByteArrayStream(String path)
           
 boolean hasMore()
           
 byte nextByte()
          读取一个字节
 char nextChar()
          读取一个char,对应于writeChar
 double nextDouble()
           
 float nextFloat()
           
 int nextInt()
          读取一个int
 
从类 com.hankcs.hanlp.corpus.io.ByteArray 继承的方法
createByteArray, getBytes, getLength, getOffset, nextString, nextUnsignedShort, nextUTF
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ByteArrayStream

public ByteArrayStream(byte[] bytes,
                       int bufferSize,
                       FileChannel fileChannel)
方法详细信息

createByteArrayStream

public static ByteArrayStream createByteArrayStream(String path)

nextInt

public int nextInt()
从类 ByteArray 复制的描述
读取一个int

覆盖:
ByteArray 中的 nextInt
返回:

nextChar

public char nextChar()
从类 ByteArray 复制的描述
读取一个char,对应于writeChar

覆盖:
ByteArray 中的 nextChar
返回:

nextDouble

public double nextDouble()
覆盖:
ByteArray 中的 nextDouble

nextByte

public byte nextByte()
从类 ByteArray 复制的描述
读取一个字节

覆盖:
ByteArray 中的 nextByte
返回:

nextFloat

public float nextFloat()
覆盖:
ByteArray 中的 nextFloat

hasMore

public boolean hasMore()
覆盖:
ByteArray 中的 hasMore


Copyright © 2014–2015 鐮佸啘鍦�/a>. All rights reserved.