org.simantics.databoard.util.binary
Class BinaryFile2

java.lang.Object
  extended by org.simantics.databoard.util.binary.BinaryFile2

public class BinaryFile2
extends java.lang.Object

BinaryFile of multiple cache windows.

Author:
Toni Kalajainen

Constructor Summary
BinaryFile2(java.io.File file, int buf_size)
           
BinaryFile2(java.io.RandomAccessFile file, int buf_size)
           
 
Method Summary
 void close()
          Closes the object.
 java.io.File file()
           
 void flush()
          Complete flush.
 java.io.RandomAccessFile getRandomAccessFile()
           
 java.nio.ByteOrder order()
           
 void order(java.nio.ByteOrder order)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryFile2

public BinaryFile2(java.io.RandomAccessFile file,
                   int buf_size)
            throws java.io.IOException
Throws:
java.io.IOException

BinaryFile2

public BinaryFile2(java.io.File file,
                   int buf_size)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Closes the object. Note, this will close the input random access file. This method may be called several times.

Throws:
java.io.IOException

file

public java.io.File file()

getRandomAccessFile

public java.io.RandomAccessFile getRandomAccessFile()

order

public java.nio.ByteOrder order()

order

public void order(java.nio.ByteOrder order)

flush

public void flush()
           throws java.io.IOException
Complete flush. After this call all dirty blocks are flushed into disk. The sum of memory blocks will be less than buf_size.

Throws:
java.io.IOException