org.eclipse.birt.core.archive
Class RAStreamBuffer

java.lang.Object
  extended by org.eclipse.birt.core.archive.RAStreamBuffer

public class RAStreamBuffer
extends java.lang.Object


Constructor Summary
RAStreamBuffer(java.io.RandomAccessFile randomFile)
           
 
Method Summary
 void flushBuffer()
          Write the data in the buffer to the underlying file
 int getBufCur()
           
 long getOffset()
           
 void resetBuffer(long offset)
          Set the buffer to a different offset in the underlying file.
 void setBufCur(int bufCur)
           
 int write(byte[] b, int off, int len)
          Write the data in the b[] to the interal buffer Can only write to the end of the interal buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAStreamBuffer

public RAStreamBuffer(java.io.RandomAccessFile randomFile)
Method Detail

resetBuffer

public void resetBuffer(long offset)
                 throws java.io.IOException
Set the buffer to a different offset in the underlying file. Read the data already written into the file.

Parameters:
offset -
Throws:
java.io.IOException

getOffset

public long getOffset()

setBufCur

public void setBufCur(int bufCur)

getBufCur

public int getBufCur()

flushBuffer

public void flushBuffer()
                 throws java.io.IOException
Write the data in the buffer to the underlying file

Throws:
java.io.IOException

write

public int write(byte[] b,
                 int off,
                 int len)
Write the data in the b[] to the interal buffer Can only write to the end of the interal buffer

Parameters:
b -
off -
len -
Returns:
number of bytes has been written to the interal buffer


Copyright © 2008 Actuate Corp. All rights reserved.