Class calypso.util.RandomAccessFileWithByteLines
All Packages This Package Class Hierarchy Class Search Index
Class calypso.util.RandomAccessFileWithByteLines
java.lang.Object
|
+----calypso.util.RandomAccessFileWithByteLines
public class RandomAccessFileWithByteLines
extends java.lang.Object
{
// Fields 5
static final int INITBUFSIZE;
protected byte[] fBuffer;
protected int fEnd;
protected RandomAccessFile fInput;
protected int fOffset;
// Constructors 1
public RandomAccessFileWithByteLines(RandomAccessFile);
// Methods 7
public boolean eatNewline() throws IOException;
protected boolean fill() throws IOException;
protected boolean fillForCapacity(int) throws IOException;
public long getFilePointer() throws IOException;
public void readFully(byte[], int, int) throws IOException;
public boolean readLine(ByteBuf) throws IOException;
public void seek(long) throws IOException;
}
Fields
static final int INITBUFSIZE
protected RandomAccessFile fInput
protected byte[] fBuffer
protected int fOffset
protected int fEnd
Constructors
public RandomAccessFileWithByteLines(RandomAccessFile f)
Methods
public boolean readLine(ByteBuf buf) throws IOException
public boolean eatNewline() throws IOException
Eat up one newline if present in the fBuffer. If a newline
was eaten up return true otherwise false. This will handle
mac (\r), unix (\n) and windows (\r\n) style of newlines
transparently.
public long getFilePointer() throws IOException
public void seek(long loc) throws IOException
protected boolean fill() throws IOException
protected boolean fillForCapacity(int capacity) throws IOException
Fill the fBuffer, keeping whatever is unread in the fBuffer and
ensuring that "capacity" characters of total filled fBuffer
space is available. Return false if the final amount of data
in the fBuffer is less than capacity, otherwise return true.
public void readFully(byte[] arr,
int off,
int length) throws IOException
All Packages This Package Class Hierarchy Class Search Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4
|