org.apache.lucene.index

## Class MockIndexInput

- java.lang.Object
- - org.apache.lucene.store.DataInput
  - - org.apache.lucene.store.IndexInput
    - - org.apache.lucene.store.BufferedIndexInput
      - - org.apache.lucene.index.MockIndexInput

All Implemented Interfaces:
  Closeable, AutoCloseable, Cloneable

    public class MockIndexInput
    extends BufferedIndexInput

IndexInput backed by a byte[] for testing.

### Field Summary

### Fields inherited from class org.apache.lucene.store.BufferedIndexInput

`BUFFER_SIZE, MERGE_BUFFER_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`MockIndexInput(byte[] bytes)`

### Method Summary

Methods
`void` `close()`
`long` `length()`
`protected void` `readInternal(byte[] dest, int destOffset, int len)`
`protected void` `seekInternal(long pos)`

### Methods inherited from class org.apache.lucene.store.BufferedIndexInput

`bufferSize, clone, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize`

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

`toString`

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

`readString, readStringSet, readStringStringMap`

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### MockIndexInput

    public MockIndexInput(byte[] bytes)

### Method Detail

#### readInternal

    protected void readInternal(byte[] dest,
                    int destOffset,
                    int len)

Specified by:
  `readInternal` in class `BufferedIndexInput`

#### close

    public void close()

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in class `IndexInput`

#### seekInternal

    protected void seekInternal(long pos)

Specified by:
  `seekInternal` in class `BufferedIndexInput`

#### length

    public long length()

Specified by:
  `length` in class `IndexInput`