appl.parallel.data.xulugridfile
Class BufferedRandomAccessFile

java.lang.Object
  extended by java.io.RandomAccessFile
      extended by appl.parallel.data.xulugridfile.BufferedRandomAccessFile
All Implemented Interfaces:
Closeable, DataInput, DataOutput

public class BufferedRandomAccessFile
extends RandomAccessFile

Copied from java world. See http://www.javaworld.com/javaworld/javatips/jw-javatip26.html

Author:
Nick Zhang

Constructor Summary
BufferedRandomAccessFile(String filename, String mode, int bufsize)
           
 
Method Summary
 long getFilePointer()
           
 String getNextLine()
          return a next line in String
 int read()
           
 int read(byte[] b, int off, int len)
           
 void seek(long pos)
           
 
Methods inherited from class java.io.RandomAccessFile
close, getChannel, getFD, length, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedRandomAccessFile

public BufferedRandomAccessFile(String filename,
                                String mode,
                                int bufsize)
                         throws IOException
Throws:
IOException
Method Detail

read

public final int read()
               throws IOException
Overrides:
read in class RandomAccessFile
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class RandomAccessFile
Throws:
IOException

getFilePointer

public long getFilePointer()
                    throws IOException
Overrides:
getFilePointer in class RandomAccessFile
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Overrides:
seek in class RandomAccessFile
Throws:
IOException

getNextLine

public final String getNextLine()
                         throws IOException
return a next line in String

Throws:
IOException