com.sun.jimi.core.vmem
Class IntPageFrame

java.lang.Object
  |
  +--com.sun.jimi.core.vmem.PageFrame
        |
        +--com.sun.jimi.core.vmem.IntPageFrame

public class IntPageFrame
extends PageFrame

PageFrame supporting int-based pages.


Field Summary
protected static int BUFFER_VALUES
          How many values should be buffered between writes to the stream.
protected static byte[] iobuffer
          a buffer used for stream I/O
protected  int[] pageData
          in-memory buffer containing data for a page
 
Fields inherited from class com.sun.jimi.core.vmem.PageFrame
logicalPageNumber, modified, timeStamp
 
Constructor Summary
IntPageFrame(int size)
          Create a page frame for storing a specified number of values.
 
Method Summary
 int[] getPageData()
          Return the internal page data buffer.
 void readFrom(java.io.InputStream input)
          Read the page data from an InputStream.
 void writeTo(java.io.OutputStream output)
          Write the page data to an OutputStream.
 
Methods inherited from class com.sun.jimi.core.vmem.PageFrame
getLogicalPageNumber, isModified, lastTouched, setLogicalPageNumber, setModified, touch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_VALUES

protected static final int BUFFER_VALUES
How many values should be buffered between writes to the stream. This buffer is separate from the page data buffer.

pageData

protected int[] pageData
in-memory buffer containing data for a page

iobuffer

protected static byte[] iobuffer
a buffer used for stream I/O
Constructor Detail

IntPageFrame

public IntPageFrame(int size)
Create a page frame for storing a specified number of values.
Parameters:
size - the number of ints in the frame.
Method Detail

writeTo

public void writeTo(java.io.OutputStream output)
             throws java.io.IOException
Write the page data to an OutputStream.
Parameters:
output - the stream to write to
Overrides:
writeTo in class PageFrame

readFrom

public void readFrom(java.io.InputStream input)
              throws java.io.IOException
Read the page data from an InputStream.
Parameters:
input - the stream to read from
Overrides:
readFrom in class PageFrame

getPageData

public int[] getPageData()
Return the internal page data buffer.
Returns:
the int array containing page data