org.apache.lucene.store

## Class RAMFile

- java.lang.Object
- - org.apache.lucene.store.RAMFile

- All Implemented Interfaces:
    java.io.Serializable

      public class RAMFile
      extends java.lang.Object
      implements java.io.Serializable

  For Lucene internal use
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.ArrayList` | `buffers`
    `protected long` | `sizeInBytes`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RAMFile()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `addBuffer(int size)`
    `protected byte[]` | `getBuffer(int index)`
    `long` | `getLastModified()`
    `long` | `getLength()`
    `long` | `getSizeInBytes()`
    `protected byte[]` | `newBuffer(int size)` Expert: allocate a new buffer.
    `protected int` | `numBuffers()`
    `protected void` | `setLastModified(long lastModified)`
    `protected void` | `setLength(long length)`

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

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

- - ### Field Detail

    - #### buffers

          protected java.util.ArrayList buffers

    - #### sizeInBytes

          protected long sizeInBytes

  - ### Constructor Detail

    - #### RAMFile

          protected RAMFile()

  - ### Method Detail

    - #### getLength

          public long getLength()

    - #### setLength

          protected void setLength(long length)

    - #### getLastModified

          public long getLastModified()

    - #### setLastModified

          protected void setLastModified(long lastModified)

    - #### addBuffer

          protected final byte[] addBuffer(int size)

    - #### getBuffer

          protected final byte[] getBuffer(int index)

    - #### numBuffers

          protected final int numBuffers()

    - #### newBuffer

          protected byte[] newBuffer(int size)

      Expert: allocate a new buffer. Subclasses can allocate differently.
      Parameters:
        `size` - size of allocated buffer.
      Returns:
        allocated buffer.

    - #### getSizeInBytes

          public long getSizeInBytes()

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