org.tmatesoft.sqljet.core.internal.memory
Class SqlJetDirectByteBuffer

java.lang.Object
  extended by org.tmatesoft.sqljet.core.internal.memory.SqlJetByteBuffer
      extended by org.tmatesoft.sqljet.core.internal.memory.SqlJetDirectByteBuffer
All Implemented Interfaces:
ISqlJetMemoryBuffer

public class SqlJetDirectByteBuffer
extends SqlJetByteBuffer


Field Summary
 
Fields inherited from class org.tmatesoft.sqljet.core.internal.memory.SqlJetByteBuffer
buffer
 
Constructor Summary
SqlJetDirectByteBuffer()
           
SqlJetDirectByteBuffer(java.nio.ByteBuffer buffer)
           
 
Method Summary
 void allocate(int size)
          Allocate chunk of memory.
 byte[] asArray()
           
 void fill(int from, int count, byte value)
           
 void getBytes(int pointer, byte[] bytes, int to, int count)
           
 void putBytes(int pointer, byte[] bytes, int from, int count)
           
 
Methods inherited from class org.tmatesoft.sqljet.core.internal.memory.SqlJetByteBuffer
compareTo, copyFrom, free, getByte, getByteUnsigned, getInt, getIntUnsigned, getLong, getPointer, getShort, getShortUnsigned, getSize, isAllocated, putByte, putByteUnsigned, putInt, putIntUnsigned, putLong, putShort, putShortUnsigned, readFromFile, writeToFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlJetDirectByteBuffer

public SqlJetDirectByteBuffer()

SqlJetDirectByteBuffer

public SqlJetDirectByteBuffer(java.nio.ByteBuffer buffer)
Method Detail

allocate

public void allocate(int size)
Description copied from interface: ISqlJetMemoryBuffer
Allocate chunk of memory. If memory already has allocated then fries current chunk and allocates new.

Specified by:
allocate in interface ISqlJetMemoryBuffer
Overrides:
allocate in class SqlJetByteBuffer
Parameters:
size - size of chunk in bytes

asArray

public byte[] asArray()
Specified by:
asArray in interface ISqlJetMemoryBuffer
Overrides:
asArray in class SqlJetByteBuffer
Returns:

fill

public void fill(int from,
                 int count,
                 byte value)
Specified by:
fill in interface ISqlJetMemoryBuffer
Overrides:
fill in class SqlJetByteBuffer

getBytes

public void getBytes(int pointer,
                     byte[] bytes,
                     int to,
                     int count)
Specified by:
getBytes in interface ISqlJetMemoryBuffer
Overrides:
getBytes in class SqlJetByteBuffer

putBytes

public void putBytes(int pointer,
                     byte[] bytes,
                     int from,
                     int count)
Specified by:
putBytes in interface ISqlJetMemoryBuffer
Overrides:
putBytes in class SqlJetByteBuffer