public final class ByteArrayIndexInput extends IndexInput
| Constructor and Description | 
|---|
| ByteArrayIndexInput(String description,
                   byte[] bytes) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Closes the stream to further operations. | 
| boolean | eof() | 
| long | getFilePointer()Returns the current position in this file, where the next read will
 occur. | 
| long | length()The number of bytes in the file. | 
| byte | readByte()Reads and returns a single byte. | 
| void | readBytes(byte[] b,
         int offset,
         int len)Reads a specified number of bytes into an array at the specified offset. | 
| int | readInt()Reads four bytes and returns an int. | 
| long | readLong()Reads eight bytes and returns a long. | 
| short | readShort()Reads two bytes and returns a short. | 
| int | readVInt()Reads an int stored in variable-length format. | 
| long | readVLong()Reads a long stored in variable-length format. | 
| void | reset(byte[] bytes,
     int offset,
     int len) | 
| void | seek(long pos)Sets current position in this file, where the next read will occur. | 
| void | skipBytes(long count)Skip over  numBytesbytes. | 
| IndexInput | slice(String sliceDescription,
     long offset,
     long length)Creates a slice of this index input, with the given description, offset, and length. | 
clone, getFullSliceDescription, randomAccessSlice, toStringreadBytes, readMapOfStrings, readSetOfStrings, readString, readStringSet, readStringStringMap, readZInt, readZLongpublic ByteArrayIndexInput(String description, byte[] bytes)
public long getFilePointer()
IndexInputgetFilePointer in class IndexInputIndexInput.seek(long)public void seek(long pos)
IndexInputEOFException and then the
  stream is in an undetermined state.seek in class IndexInputIndexInput.getFilePointer()public void reset(byte[] bytes,
                  int offset,
                  int len)
public long length()
IndexInputlength in class IndexInputpublic boolean eof()
public void skipBytes(long count)
DataInputnumBytes bytes. The contract on this method is that it
 should have the same behavior as reading the same number of bytes into a
 buffer and discarding its content. Negative values of numBytes
 are not supported.public short readShort()
DataInputreadShort in class DataInputDataOutput.writeByte(byte)public int readInt()
DataInputreadInt in class DataInputDataOutput.writeInt(int)public long readLong()
DataInputreadLong in class DataInputDataOutput.writeLong(long)public int readVInt()
DataInput
 The format is described further in DataOutput.writeVInt(int).
readVInt in class DataInputDataOutput.writeVInt(int)public long readVLong()
DataInput
 The format is described further in DataOutput.writeVInt(int).
readVLong in class DataInputDataOutput.writeVLong(long)public byte readByte()
DataInputreadByte in class DataInputDataOutput.writeByte(byte)public void readBytes(byte[] b,
                      int offset,
                      int len)
DataInputreadBytes in class DataInputb - the array to read bytes intooffset - the offset in the array to start storing byteslen - the number of bytes to readDataOutput.writeBytes(byte[],int)public void close()
IndexInputclose in interface Closeableclose in interface AutoCloseableclose in class IndexInputpublic IndexInput slice(String sliceDescription, long offset, long length) throws IOException
IndexInputslice in class IndexInputIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.