ucar.unidata.io
Class InMemoryRandomAccessFile

java.lang.Object
  extended by ucar.unidata.io.RandomAccessFile
      extended by ucar.unidata.io.InMemoryRandomAccessFile
All Implemented Interfaces:
java.io.DataInput, java.io.DataOutput

public class InMemoryRandomAccessFile
extends RandomAccessFile

Author:
john

Field Summary
 
Fields inherited from class ucar.unidata.io.RandomAccessFile
BIG_ENDIAN, LITTLE_ENDIAN, openFiles
 
Constructor Summary
InMemoryRandomAccessFile(java.lang.String location, byte[] data)
          Constructor for in-memory "files"
 
Method Summary
 long length()
          Get the length of the file.
 
Methods inherited from class ucar.unidata.io.RandomAccessFile
close, flush, getChannel, getFD, getFilePointer, getLocation, getRandomAccessFile, isAtEndOfFile, isCached, order, read, read, read, readBoolean, readByte, readChar, readDouble, readDouble, readFloat, readFloat, readFully, readFully, readInt, readInt, readIntUnbuffered, readLine, readLong, readLong, readShort, readShort, readString, readUnsignedByte, readUnsignedShort, readUTF, seek, setCached, setDebugLeaks, setExtendMode, setMinLength, skipBytes, synch, toString, unread, write, write, write, writeBoolean, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeChar, writeChar, writeChars, writeDouble, writeDouble, writeFloat, writeFloat, writeInt, writeInt, writeLong, writeLong, writeShort, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InMemoryRandomAccessFile

public InMemoryRandomAccessFile(java.lang.String location,
                                byte[] data)
Constructor for in-memory "files"

Parameters:
location - used as a name
data - the complete file
Method Detail

length

public long length()
Description copied from class: RandomAccessFile
Get the length of the file. The data in the buffer (which may not have been written the disk yet) is taken into account.

Overrides:
length in class RandomAccessFile
Returns:
the length of the file in bytes.