Class RandomAccessFilePaged

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

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

    Constructors
    Constructor
    Description
    RandomAccessFilePaged(String filePath, String accessRights, int pagesize)
    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 offset, int len)
    check file contents
    void
    close file
    void
     
    void
    close 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
    static void
     
    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
    writeInternal(byte[] bytes, int offset, int len)
     
    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