org.nlogo.workspace
Class DefaultFileManager

java.lang.Object
  extended by org.nlogo.workspace.DefaultFileManager
All Implemented Interfaces:
FileManager

public final class DefaultFileManager
extends Object
implements FileManager


Constructor Summary
DefaultFileManager(AbstractWorkspace workspace)
           
 
Method Summary
 String attachPrefix(String filename)
           
 void closeAllFiles()
           
 void closeCurrentFile()
           
 void deleteFile(String filePath)
           
 void ensureMode(File.Mode openMode)
           
 boolean eof()
           
 boolean fileExists(String filePath)
           
 void flushCurrentFile()
           
 void flushFile(String flushFileName)
           
 String getErrorInfo()
           
 File getFile(String fileName)
           
 String getPrefix()
           
 void handleModelChange()
           
 boolean hasCurrentFile()
           
 void openFile(String newFileName)
           
 Object read(World world)
           
 String readChars(int num)
           
 String readLine()
           
 String readRemainder()
           
 void setCurrentFile(File newFile)
           
 void setPrefix(String newPrefix)
           
 void setPrefix(URL newPrefix)
           
 void writeOutputObject(OutputObject oo)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileManager

public DefaultFileManager(AbstractWorkspace workspace)
Method Detail

getErrorInfo

public String getErrorInfo()
                    throws IOException
Specified by:
getErrorInfo in interface FileManager
Throws:
IOException

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface FileManager

getFile

public File getFile(String fileName)
Specified by:
getFile in interface FileManager

setPrefix

public void setPrefix(String newPrefix)
Specified by:
setPrefix in interface FileManager

setPrefix

public void setPrefix(URL newPrefix)
Specified by:
setPrefix in interface FileManager

attachPrefix

public String attachPrefix(String filename)
                    throws MalformedURLException
Specified by:
attachPrefix in interface FileManager
Throws:
MalformedURLException

hasCurrentFile

public boolean hasCurrentFile()
Specified by:
hasCurrentFile in interface FileManager

setCurrentFile

public void setCurrentFile(File newFile)

ensureMode

public void ensureMode(File.Mode openMode)
                throws IOException
Specified by:
ensureMode in interface FileManager
Throws:
IOException

fileExists

public boolean fileExists(String filePath)
Specified by:
fileExists in interface FileManager

deleteFile

public void deleteFile(String filePath)
                throws IOException
Specified by:
deleteFile in interface FileManager
Throws:
IOException

openFile

public void openFile(String newFileName)
              throws IOException
Specified by:
openFile in interface FileManager
Throws:
IOException

flushCurrentFile

public void flushCurrentFile()
                      throws IOException
Specified by:
flushCurrentFile in interface FileManager
Throws:
IOException

flushFile

public void flushFile(String flushFileName)

closeCurrentFile

public void closeCurrentFile()
                      throws IOException
Specified by:
closeCurrentFile in interface FileManager
Throws:
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface FileManager
Throws:
IOException

readChars

public String readChars(int num)
                 throws IOException
Specified by:
readChars in interface FileManager
Throws:
IOException

readRemainder

public String readRemainder()
                     throws IOException
Throws:
IOException

read

public Object read(World world)
            throws IOException,
                   CompilerException
Specified by:
read in interface FileManager
Throws:
IOException
CompilerException

eof

public boolean eof()
            throws IOException
Specified by:
eof in interface FileManager
Throws:
IOException

closeAllFiles

public void closeAllFiles()
                   throws IOException
Specified by:
closeAllFiles in interface FileManager
Throws:
IOException

writeOutputObject

public void writeOutputObject(OutputObject oo)

handleModelChange

public void handleModelChange()