org.apache.lucene.store

## Class SimpleFSDirectory.SimpleFSIndexOutput

- java.lang.Object
- - org.apache.lucene.store.IndexOutput
  - - org.apache.lucene.store.BufferedIndexOutput
    - - org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexOutput

- Direct Known Subclasses:
    FSDirectory.FSIndexOutput
  Enclosing class:
    SimpleFSDirectory

      protected static class SimpleFSDirectory.SimpleFSIndexOutput
      extends BufferedIndexOutput

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleFSIndexOutput(java.io.File path)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes this stream to further operations.
    `void` | `flushBuffer(byte[] b, int offset, int size)` output methods:
    `long` | `length()` The number of bytes in the file.
    `void` | `seek(long pos)` Random-access methods
    `void` | `setLength(long length)` Set the file length.

    - ### Methods inherited from class org.apache.lucene.store.BufferedIndexOutput

      `flush, getFilePointer, writeByte, writeBytes`

    - ### Methods inherited from class org.apache.lucene.store.IndexOutput

      `copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeString, writeStringStringMap, writeVInt, writeVLong`

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

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

- - ### Constructor Detail

    - #### SimpleFSIndexOutput

          public SimpleFSIndexOutput(java.io.File path)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### flushBuffer

          public void flushBuffer(byte[] b,
                                  int offset,
                                  int size)
                           throws java.io.IOException

      output methods:
      Specified by:
        `flushBuffer` in class `BufferedIndexOutput`
      Parameters:
        `b` - the bytes to write
        `offset` - the offset in the byte array
        `size` - the number of bytes to write
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Description copied from class: `BufferedIndexOutput`
      Closes this stream to further operations.
      Overrides:
        `close` in class `BufferedIndexOutput`
      Throws:
        `java.io.IOException`

    - #### seek

          public void seek(long pos)
                    throws java.io.IOException

      Random-access methods
      Overrides:
        `seek` in class `BufferedIndexOutput`
      Throws:
        `java.io.IOException`
      See Also:
        `BufferedIndexOutput.getFilePointer()`

    - #### length

          public long length()
                      throws java.io.IOException

      Description copied from class: `BufferedIndexOutput`
      The number of bytes in the file.
      Specified by:
        `length` in class `BufferedIndexOutput`
      Throws:
        `java.io.IOException`

    - #### setLength

          public void setLength(long length)
                         throws java.io.IOException

      Description copied from class: `IndexOutput`
      Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.
      Overrides:
        `setLength` in class `IndexOutput`
      Parameters:
        `length` - file length
      Throws:
        `java.io.IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.