com.imagero.uio.buffer.fm
Class OpenFileManager

java.lang.Object
  extended bycom.imagero.uio.buffer.fm.OpenFileManager

public class OpenFileManager
extends java.lang.Object

OpenFileManager manages open files. If too much files are opened, FileManager closes some of them and opens them later if needed.


Constructor Summary
OpenFileManager()
           
 
Method Summary
 void close(RandomAccessRO ro)
          finally close RandomAccessRO and remove it from this FileManager
 RandomAccess create(java.io.File f)
          create RandomAccess which will be managed by this FileManager
 RandomAccessRO createRO(java.io.File f)
          create RandomAccessRO which will be managed by this FileManager
 int getMaxOpenCount()
          get max count of simultaneously open files.
static boolean isDebug()
           
static void setDebug(boolean debug)
           
 void setMaxOpenCount(int maxOpenCount)
          set max count of simultaneously open files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenFileManager

public OpenFileManager()
Method Detail

isDebug

public static boolean isDebug()

setDebug

public static void setDebug(boolean debug)

createRO

public RandomAccessRO createRO(java.io.File f)
                        throws java.io.IOException
create RandomAccessRO which will be managed by this FileManager

Parameters:
f - File
Returns:
created RandomAccessRO
Throws:
java.io.IOException

create

public RandomAccess create(java.io.File f)
                    throws java.io.IOException
create RandomAccess which will be managed by this FileManager

Parameters:
f - File
Returns:
created RandomAccess
Throws:
java.io.IOException

close

public void close(RandomAccessRO ro)
finally close RandomAccessRO and remove it from this FileManager


getMaxOpenCount

public int getMaxOpenCount()
get max count of simultaneously open files.


setMaxOpenCount

public void setMaxOpenCount(int maxOpenCount)
set max count of simultaneously open files.