## org.apache.lucene.store
Class RAMFile

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

    public class RAMFile

extends Object

Represents a file in RAM as a list of byte[] buffers.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
`protected ArrayList<byte[]>` `buffers`
`protected long` `sizeInBytes`

Constructor Summary
`RAMFile()`

Method Summary
`protected byte[]` `addBuffer(int size)`
`protected byte[]` `getBuffer(int index)`
`long` `getLength()`
`long` `getSizeInBytes()`
`protected byte[]` `newBuffer(int size)` Expert: allocate a new buffer.
`protected int` `numBuffers()`
`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 ArrayList<byte[]> buffers

### sizeInBytes

    protected long sizeInBytes

Constructor Detail

### RAMFile

    public RAMFile()

Method Detail

### getLength

    public long getLength()

### setLength

    protected void setLength(long length)

### 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-2013 Apache Software Foundation. All Rights Reserved.