Class RandomAccessFileRAF

java.lang.Object
com.semedy.reasoner.edb.persistentstore.RandomAccessFileRAF
All Implemented Interfaces:
RandomAccessToFile

public class RandomAccessFileRAF extends Object implements RandomAccessToFile
A ramdom acess file paged. It provides a linear address room
Author:
juergen
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    RandomAccessFileRAF(String filePath, String accessRights)
    creates a new file with given filepath and access rights "r" for read,
    "rw" for read and write
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkFile(long position, int len)
    check file contents
    void
    close file
    void
     
    void
    flush file
    long
    get the current position of the file
    long
    Get the file length
    void
    read(byte[] bytes)
    Reads a byte array from current position.
    void
    read(byte[] bytes, int offset, int len)
    Reads len bytes from current file position to array from offset position on.
    byte
    Reads a byte from current position.
    int
    Reads an int at current position.
    long
    Reads a long at current position.
    void
    seek(long position)
    Positions to an address
    void
    write(byte[] bytes)
    Writes a byte array to current position.
    void
    write(byte[] bytes, int offset, int len)
    Writes len bytes from byte array from offset position on to current file position.
    void
    writeByte(int b)
    Reads a byte current position
    void
    writeInt(int value)
    Writes an int to current position.
    void
    writeLong(long value)
    Writes a long to current position.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait