edu.rice.cs.hpc.data.util.LargeByteBuffer Class Reference

The idea for this class is credited to Stu Thompson. More...

Collaboration diagram for edu.rice.cs.hpc.data.util.LargeByteBuffer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LargeByteBuffer (FileChannel in, int headerSz, int recordSz) throws IOException
byte get (long position) throws IOException
int getInt (long position) throws IOException
long getLong (long position) throws IOException
double getDouble (long position) throws IOException
char getChar (long position) throws IOException
String getString (long position, long length) throws IOException
float getFloat (long position) throws IOException
short getShort (long position) throws IOException
long size ()
void dispose ()

Private Member Functions

long getCurrentSize (long index) throws IOException
MappedByteBuffer setBuffer (int page) throws IOException
MappedByteBuffer getBuffer (int page) throws IOException

Static Private Member Functions

static long gcd (long a, long b)
static long lcm (long a, long b)

Private Attributes

MappedByteBuffer[] masterBuffer
 The masterBuffer holds a vector of all bytebuffers.
long length
final FileChannel fcInput
long pageSize

Detailed Description

The idea for this class is credited to Stu Thompson.

stackoverflow.com/questions/736556/binary-search-in-a-sorted-memory-mapped-file-in-java

The implementation is credited to

Author:
Michael
Reed

Definition at line 14 of file LargeByteBuffer.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.data.util.LargeByteBuffer.LargeByteBuffer ( FileChannel  in,
int  headerSz,
int  recordSz 
) throws IOException

Member Function Documentation

void edu.rice.cs.hpc.data.util.LargeByteBuffer.dispose (  ) 
static long edu.rice.cs.hpc.data.util.LargeByteBuffer.gcd ( long  a,
long  b 
) [static, private]

Definition at line 182 of file LargeByteBuffer.java.

Referenced by edu.rice.cs.hpc.data.util.LargeByteBuffer.lcm().

byte edu.rice.cs.hpc.data.util.LargeByteBuffer.get ( long  position  )  throws IOException
MappedByteBuffer edu.rice.cs.hpc.data.util.LargeByteBuffer.getBuffer ( int  page  )  throws IOException [private]
char edu.rice.cs.hpc.data.util.LargeByteBuffer.getChar ( long  position  )  throws IOException
long edu.rice.cs.hpc.data.util.LargeByteBuffer.getCurrentSize ( long  index  )  throws IOException [private]
double edu.rice.cs.hpc.data.util.LargeByteBuffer.getDouble ( long  position  )  throws IOException
float edu.rice.cs.hpc.data.util.LargeByteBuffer.getFloat ( long  position  )  throws IOException
int edu.rice.cs.hpc.data.util.LargeByteBuffer.getInt ( long  position  )  throws IOException
long edu.rice.cs.hpc.data.util.LargeByteBuffer.getLong ( long  position  )  throws IOException
short edu.rice.cs.hpc.data.util.LargeByteBuffer.getShort ( long  position  )  throws IOException
String edu.rice.cs.hpc.data.util.LargeByteBuffer.getString ( long  position,
long  length 
) throws IOException
static long edu.rice.cs.hpc.data.util.LargeByteBuffer.lcm ( long  a,
long  b 
) [static, private]
MappedByteBuffer edu.rice.cs.hpc.data.util.LargeByteBuffer.setBuffer ( int  page  )  throws IOException [private]
long edu.rice.cs.hpc.data.util.LargeByteBuffer.size (  ) 

Member Data Documentation


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1