org.w3c.rdfpic.core
Class FilePHandler

java.lang.Object
  |
  +--org.w3c.rdfpic.core.FilePHandler

class FilePHandler
extends java.lang.Object
implements SubPHandler

FilePHandler is an implementation of SubPHandler for the file:// protocol.


Field Summary
(package private)  boolean readable
           
(package private)  byte[] readBuf
           
(package private)  java.io.File theFile
           
(package private)  boolean writable
           
 
Constructor Summary
FilePHandler(java.net.URL url)
           
 
Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 java.lang.String contentType()
          Returns the MIME type of the loaded file.
 byte[] getReadBuf()
          After initialization, all data must be buffered.
 void write(byte[] data)
          Overwrites file with given data...
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

readBuf

byte[] readBuf

theFile

java.io.File theFile

writable

boolean writable

readable

boolean readable
Constructor Detail

FilePHandler

public FilePHandler(java.net.URL url)
             throws PHException
Method Detail

canRead

public boolean canRead()
Specified by:
canRead in interface SubPHandler

canWrite

public boolean canWrite()
Specified by:
canWrite in interface SubPHandler

getReadBuf

public byte[] getReadBuf()
Description copied from interface: SubPHandler
After initialization, all data must be buffered. This allows ProtocolHandler to take care of the buffering from now on.
Specified by:
getReadBuf in interface SubPHandler

write

public void write(byte[] data)
           throws PHException
Description copied from interface: SubPHandler
Overwrites file with given data...
Specified by:
write in interface SubPHandler

contentType

public java.lang.String contentType()
Description copied from interface: SubPHandler
Returns the MIME type of the loaded file.
Specified by:
contentType in interface SubPHandler