MockIndexOutputWrapper (Lucene 3.6.2 API)
Keywords: org.apache.lucene.store.MockIndexOutputWrapper class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.store
Class MockIndexOutputWrapper

    java.lang.Object
      org.apache.lucene.store.DataOutput
          org.apache.lucene.store.IndexOutput
              org.apache.lucene.store.MockIndexOutputWrapper

All Implemented Interfaces:
  Closeable

    public class MockIndexOutputWrapper

extends org.apache.lucene.store.IndexOutput

Used by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.

Constructor Summary
`MockIndexOutputWrapper(MockDirectoryWrapper dir, org.apache.lucene.store.IndexOutput delegate, String name)` Construct an empty output buffer.

Method Summary
`void` | `close()`
`void` | `copyBytes(org.apache.lucene.store.DataInput input, long numBytes)`
`void` | `flush()`
`long` | `getFilePointer()`
`long` | `length()`
`void` | `seek(long pos)`
`void` | `setLength(long length)`
`void` | `writeByte(byte b)`
`void` | `writeBytes(byte[] b, int offset, int len)`

Methods inherited from class org.apache.lucene.store.DataOutput
`writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MockIndexOutputWrapper

    public MockIndexOutputWrapper(MockDirectoryWrapper dir,
                                  org.apache.lucene.store.IndexOutput delegate,
                                  String name)

  Construct an empty output buffer.

Method Detail

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in class `org.apache.lucene.store.IndexOutput`
  Throws:
    `IOException`

### flush

    public void flush()
               throws IOException

  Specified by:
    `flush` in class `org.apache.lucene.store.IndexOutput`
  Throws:
    `IOException`

### writeByte

    public void writeByte(byte b)
                   throws IOException

  Specified by:
    `writeByte` in class `org.apache.lucene.store.DataOutput`
  Throws:
    `IOException`

### writeBytes

    public void writeBytes(byte[] b,
                           int offset,
                           int len)
                    throws IOException

  Specified by:
    `writeBytes` in class `org.apache.lucene.store.DataOutput`
  Throws:
    `IOException`

### getFilePointer

    public long getFilePointer()

  Specified by:
    `getFilePointer` in class `org.apache.lucene.store.IndexOutput`

### seek

    public void seek(long pos)
              throws IOException

  Specified by:
    `seek` in class `org.apache.lucene.store.IndexOutput`
  Throws:
    `IOException`

### length

    public long length()
                throws IOException

  Specified by:
    `length` in class `org.apache.lucene.store.IndexOutput`
  Throws:
    `IOException`

### setLength

    public void setLength(long length)
                   throws IOException

  Overrides:
    `setLength` in class `org.apache.lucene.store.IndexOutput`
  Throws:
    `IOException`

### copyBytes

    public void copyBytes(org.apache.lucene.store.DataInput input,
                          long numBytes)
                   throws IOException

  Overrides:
    `copyBytes` in class `org.apache.lucene.store.DataOutput`
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD