All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
BlockedDataFile, DataFileImp, JsonFile, SimpleDataFile

public interface DataFile extends AutoCloseable
Author:
angele
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checks free space list
    boolean
    checks for double occurences
    void
    clear file
    void
    Close file
    void
    Create a file.
    void
    delete file
    iterator for the file elements
    void
    Flush file
    void
    free(long offset)
    Frees up space at offset
    int
    length(long pos)
    length of file piece at pos
    boolean
    Open an existing file.
    byte[]
    read(long offset)
    Reads data at offset from file and returns it
    int
    readInt(long position)
    read integer at position
    void
    begin transaction
    void
    commit transaction
    void
    rollback transaction
    long
    write(byte[] data)
    write data into file.
    long
    writeCompressed(byte[] data, int originalLength)
    write compressed to file.