org.brains2b.coffee.file
Class FileConnector

java.lang.Object
  extended by org.brains2b.coffee.file.FileConnector
All Implemented Interfaces:
TicketHandler

public class FileConnector
extends java.lang.Object
implements TicketHandler

[Short description] [Long description]

Version:
[version] [lastrevisiondate]
Author:
dennis@brains2b.nl

Constructor Summary
FileConnector()
           
FileConnector(java.lang.String name, java.io.File path, java.io.File downloadPath)
           
 
Method Summary
 void addProgressMonitor(ProgressMonitor monitor)
           
 void close()
           
 java.io.File getDownloadPath()
           
 NNTPMessage getFile(java.lang.Class c, java.lang.String name)
           
 NNTPMessage getFile(FileContentHandler fch, byte[] b)
           
 NNTPMessage getFile(FileContentHandler fch, java.io.File file)
           
 int[] getHandledEvents()
           
 java.io.File getPath()
           
 NNTPMessage getRootFile(FileContentHandler fch, java.lang.String name)
           
static java.io.File getSystemPath()
           
 NNTPMessage handleEvent(CoffeeEvent event)
           
 boolean isAvailable()
           
 void open()
           
 void removeProgressMonitor(ProgressMonitor monitor)
           
 void save(FileMessage fm, java.io.File path)
           
 void save(java.io.File path, NNTPMessage message, java.lang.String name)
           
static void setSystemPath(java.lang.String file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConnector

public FileConnector(java.lang.String name,
                     java.io.File path,
                     java.io.File downloadPath)

FileConnector

public FileConnector()
Method Detail

getFile

public NNTPMessage getFile(java.lang.Class c,
                           java.lang.String name)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getRootFile

public NNTPMessage getRootFile(FileContentHandler fch,
                               java.lang.String name)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getFile

public NNTPMessage getFile(FileContentHandler fch,
                           java.io.File file)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getFile

public NNTPMessage getFile(FileContentHandler fch,
                           byte[] b)
                    throws java.lang.Exception
Throws:
java.lang.Exception

save

public void save(java.io.File path,
                 NNTPMessage message,
                 java.lang.String name)
          throws java.lang.Exception
Throws:
java.lang.Exception

save

public void save(FileMessage fm,
                 java.io.File path)
          throws java.io.IOException
Throws:
java.io.IOException

addProgressMonitor

public void addProgressMonitor(ProgressMonitor monitor)
Specified by:
addProgressMonitor in interface TicketHandler

removeProgressMonitor

public void removeProgressMonitor(ProgressMonitor monitor)
Specified by:
removeProgressMonitor in interface TicketHandler

getPath

public java.io.File getPath()

open

public void open()
          throws java.lang.Exception
Specified by:
open in interface TicketHandler
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Specified by:
close in interface TicketHandler
Throws:
java.lang.Exception

handleEvent

public NNTPMessage handleEvent(CoffeeEvent event)
                        throws CoffeeSpill
Specified by:
handleEvent in interface TicketHandler
Throws:
CoffeeSpill

isAvailable

public boolean isAvailable()
Specified by:
isAvailable in interface TicketHandler

getHandledEvents

public int[] getHandledEvents()
Specified by:
getHandledEvents in interface TicketHandler

setSystemPath

public static void setSystemPath(java.lang.String file)

getSystemPath

public static java.io.File getSystemPath()

getDownloadPath

public java.io.File getDownloadPath()