org.xerial.db.cache
Class BufferWriter

java.lang.Object
  extended by org.xerial.db.cache.BufferWriter

public class BufferWriter
extends Object

BufferWriter is a helper class to support sequential write to the buffer

Author:
leo

Constructor Summary
BufferWriter(Buffer buffer)
          Creates the BufferWriter
BufferWriter(Buffer buffer, int offset)
          Creates the BufferWriter
 
Method Summary
 int getCursorPosition()
           
 void writeBoolean(boolean value)
           
 void writeByte(byte value)
           
 void writeInt(int value)
           
 void writeLong(long value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferWriter

public BufferWriter(Buffer buffer)
Creates the BufferWriter

Parameters:
buffer - the buffer to write the data

BufferWriter

public BufferWriter(Buffer buffer,
                    int offset)
Creates the BufferWriter

Parameters:
buffer - the buffer to write the data
offset - the byte offset from which the data writing starts
Method Detail

getCursorPosition

public int getCursorPosition()

writeInt

public void writeInt(int value)

writeByte

public void writeByte(byte value)

writeLong

public void writeLong(long value)

writeBoolean

public void writeBoolean(boolean value)


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.