Class ByteArrayIndexInput

java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.elasticsearch.common.lucene.store.ByteArrayIndexInput
All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable, org.apache.lucene.store.RandomAccessInput

public class ByteArrayIndexInput extends org.apache.lucene.store.IndexInput implements org.apache.lucene.store.RandomAccessInput
Wraps array of bytes into IndexInput
  • Constructor Summary

    Constructors
    Constructor
    Description
    ByteArrayIndexInput(String resourceDesc, byte[] bytes)
     
    ByteArrayIndexInput(String resourceDesc, byte[] bytes, int offset, int length)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    long
     
    long
     
    byte
     
    byte
    readByte(long pos)
     
    void
    readBytes(byte[] b, int offset, int len)
     
    int
     
    int
    readInt(long pos)
     
    long
     
    long
    readLong(long pos)
     
    short
     
    short
    readShort(long pos)
     
    void
    seek(long l)
     
    org.apache.lucene.store.IndexInput
    slice(String sliceDescription, long offset, long length)
     

    Methods inherited from class org.apache.lucene.store.IndexInput

    clone, getFullSliceDescription, isLoaded, prefetch, randomAccessSlice, skipBytes, slice, toString, updateReadAdvice

    Methods inherited from class org.apache.lucene.store.DataInput

    readBytes, readFloats, readGroupVInt, readInts, readLongs, readMapOfStrings, readSetOfStrings, readString, readVInt, readVLong, readZInt, readZLong

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.lucene.store.RandomAccessInput

    isLoaded, prefetch, readBytes
  • Constructor Details

    • ByteArrayIndexInput

      public ByteArrayIndexInput(String resourceDesc, byte[] bytes)
    • ByteArrayIndexInput

      public ByteArrayIndexInput(String resourceDesc, byte[] bytes, int offset, int length)
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.apache.lucene.store.IndexInput
      Throws:
      IOException
    • getFilePointer

      public long getFilePointer()
      Specified by:
      getFilePointer in class org.apache.lucene.store.IndexInput
    • seek

      public void seek(long l) throws IOException
      Specified by:
      seek in class org.apache.lucene.store.IndexInput
      Throws:
      IOException
    • length

      public long length()
      Specified by:
      length in interface org.apache.lucene.store.RandomAccessInput
      Specified by:
      length in class org.apache.lucene.store.IndexInput
    • readByte

      public byte readByte(long pos) throws IOException
      Specified by:
      readByte in interface org.apache.lucene.store.RandomAccessInput
      Throws:
      IOException
    • readShort

      public short readShort(long pos) throws IOException
      Specified by:
      readShort in interface org.apache.lucene.store.RandomAccessInput
      Throws:
      IOException
    • readInt

      public int readInt(long pos) throws IOException
      Specified by:
      readInt in interface org.apache.lucene.store.RandomAccessInput
      Throws:
      IOException
    • readLong

      public long readLong(long pos) throws IOException
      Specified by:
      readLong in interface org.apache.lucene.store.RandomAccessInput
      Throws:
      IOException
    • slice

      public org.apache.lucene.store.IndexInput slice(String sliceDescription, long offset, long length) throws IOException
      Specified by:
      slice in class org.apache.lucene.store.IndexInput
      Throws:
      IOException
    • readByte

      public byte readByte() throws IOException
      Specified by:
      readByte in class org.apache.lucene.store.DataInput
      Throws:
      IOException
    • readBytes

      public void readBytes(byte[] b, int offset, int len) throws IOException
      Specified by:
      readBytes in class org.apache.lucene.store.DataInput
      Throws:
      IOException
    • readShort

      public short readShort() throws IOException
      Overrides:
      readShort in class org.apache.lucene.store.DataInput
      Throws:
      IOException
    • readInt

      public int readInt() throws IOException
      Overrides:
      readInt in class org.apache.lucene.store.DataInput
      Throws:
      IOException
    • readLong

      public long readLong() throws IOException
      Overrides:
      readLong in class org.apache.lucene.store.DataInput
      Throws:
      IOException