Lexical Tools

HeapFile

Description

This object, HeapFile, uses a disk file as if it were a RAM-based heap store. Your application uses calls to alloc( ) and Free( ) space in disk file. If your application stores the pointer returned by alloc( ), this space is persistent.

Class

HeapFile
{

// public construtor
HeapFile( String pathname );
HeapFile( String pathname, String access );
HeapFile( String pathname, int free_size );

// public methods public int alloc( int size ) throw new HeapFileAllocException;
public void close();
public void free( int ptr );
public int read( int ptr, byte[ ] b );
public int read( int ptr, byte[ ] b, int nbytes );
public int write( int ptr, byte[ ] b );
public String paramString();

}

Hierarchy

Object -> HeapFile

Reference

Please refer to Chapter 17 in Java Database Development by Martin Rinehart.