com.planet_ink.coffee_mud.core
Class CMFile.CMFileManager

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.CMFile.CMFileManager
All Implemented Interfaces:
com.planet_ink.coffee_web.interfaces.FileManager
Enclosing class:
CMFile

public static class CMFile.CMFileManager
extends java.lang.Object
implements com.planet_ink.coffee_web.interfaces.FileManager

FileManager handler for CMFile, used by WebServer


Constructor Summary
CMFile.CMFileManager()
           
 
Method Summary
 boolean allowedToReadData(java.io.File file)
           
 java.io.File createFileFromPath(java.io.File parent, java.lang.String localPath)
           
 java.io.File createFileFromPath(java.lang.String localPath)
           
 char getFileSeparator()
           
 java.io.InputStream getFileStream(java.io.File file)
           
 java.io.RandomAccessFile getRandomAccessFile(java.io.File file)
           
 byte[] readFile(java.io.File file)
           
 boolean supportsRandomAccess(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMFile.CMFileManager

public CMFile.CMFileManager()
Method Detail

getFileSeparator

public char getFileSeparator()
Specified by:
getFileSeparator in interface com.planet_ink.coffee_web.interfaces.FileManager

createFileFromPath

public java.io.File createFileFromPath(java.lang.String localPath)
Specified by:
createFileFromPath in interface com.planet_ink.coffee_web.interfaces.FileManager

createFileFromPath

public java.io.File createFileFromPath(java.io.File parent,
                                       java.lang.String localPath)
Specified by:
createFileFromPath in interface com.planet_ink.coffee_web.interfaces.FileManager

readFile

public byte[] readFile(java.io.File file)
                throws java.io.IOException,
                       java.io.FileNotFoundException
Specified by:
readFile in interface com.planet_ink.coffee_web.interfaces.FileManager
Throws:
java.io.IOException
java.io.FileNotFoundException

getFileStream

public java.io.InputStream getFileStream(java.io.File file)
                                  throws java.io.IOException,
                                         java.io.FileNotFoundException
Specified by:
getFileStream in interface com.planet_ink.coffee_web.interfaces.FileManager
Throws:
java.io.IOException
java.io.FileNotFoundException

getRandomAccessFile

public java.io.RandomAccessFile getRandomAccessFile(java.io.File file)
                                             throws java.io.IOException,
                                                    java.io.FileNotFoundException
Specified by:
getRandomAccessFile in interface com.planet_ink.coffee_web.interfaces.FileManager
Throws:
java.io.IOException
java.io.FileNotFoundException

supportsRandomAccess

public boolean supportsRandomAccess(java.io.File file)
Specified by:
supportsRandomAccess in interface com.planet_ink.coffee_web.interfaces.FileManager

allowedToReadData

public boolean allowedToReadData(java.io.File file)
Specified by:
allowedToReadData in interface com.planet_ink.coffee_web.interfaces.FileManager