org.apache.kahadb.journal
Class ReadOnlyDataFile

java.lang.Object
  extended by org.apache.kahadb.util.LinkedNode<DataFile>
      extended by org.apache.kahadb.journal.DataFile
          extended by org.apache.kahadb.journal.ReadOnlyDataFile
All Implemented Interfaces:
java.lang.Comparable<DataFile>

public class ReadOnlyDataFile
extends DataFile

Allows you to open a data file in read only mode. Useful when working with archived data files.


Field Summary
 
Fields inherited from class org.apache.kahadb.journal.DataFile
corruptedBlocks, dataFileId, file, length
 
Fields inherited from class org.apache.kahadb.util.LinkedNode
list, next, prev
 
Method Summary
 void closeRandomAccessFile(java.io.RandomAccessFile file)
           
 boolean delete()
           
 void move(java.io.File targetDirectory)
           
 java.io.RandomAccessFile openRandomAccessFile(boolean appender)
           
 
Methods inherited from class org.apache.kahadb.journal.DataFile
compareTo, equals, getCorruptedBlocks, getDataFileId, getFile, getLength, hashCode, incrementLength, openRandomAccessFile, setLength, toString
 
Methods inherited from class org.apache.kahadb.util.LinkedNode
getHeadNode, getList, getNext, getNextCircular, getPrevious, getPreviousCircular, getTailNode, isHeadNode, isLinked, isTailNode, linkAfter, linkAfter, linkBefore, linkBefore, linkToHead, linkToTail, splitAfter, splitBefore, unlink
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

openRandomAccessFile

public java.io.RandomAccessFile openRandomAccessFile(boolean appender)
                                              throws java.io.IOException
Throws:
java.io.IOException

closeRandomAccessFile

public void closeRandomAccessFile(java.io.RandomAccessFile file)
                           throws java.io.IOException
Overrides:
closeRandomAccessFile in class DataFile
Throws:
java.io.IOException

delete

public boolean delete()
               throws java.io.IOException
Overrides:
delete in class DataFile
Throws:
java.io.IOException

move

public void move(java.io.File targetDirectory)
          throws java.io.IOException
Overrides:
move in class DataFile
Throws:
java.io.IOException


Copyright © 2005-2016. All Rights Reserved.