org.millscript.commons.vfs
Interface VFile

All Superinterfaces:
VEntry
All Known Implementing Classes:
AbstractVFile, ChrootFile, FtpFile, HttpFile, LocalFile, ReadOnlyZipFile, StandardConsoleFile

public interface VFile
extends VEntry

This interface describes a file in the virtual filesystem.


Method Summary
 java.io.OutputStream getAppendOutputStream()
          Returns an output stream for appending to the existing file contents.
 java.io.Writer getAppendWriter()
          Returns a writer for appending to the existing file contents.
 java.lang.String getContentMIMEType()
          Returns the MIME type for the contents of this file.
 java.io.InputStream getInputStream()
          Returns an input stream for reading the file contents.
 java.io.OutputStream getOutputStream()
          Returns an ouptut stream for writing the file contents.
 java.io.Reader getReader()
          Returns a reader for reading the file contents.
 java.io.Writer getWriter()
          Returns a writer for writing the file contents.
 VFile toLocal()
          Returns this virtual file as a local entry, which may simply be this object.
 
Methods inherited from interface org.millscript.commons.vfs.VEntry
appendAbsolutePath, appendAbsolutePathOnVolume, appendRelativePath, appendRelativePathOnVolume, appendURI, exists, getAbsolutePath, getAbsolutePathOnVolume, getMIMEType, getMIMETypeHandler, getName, getParent, getRelativePath, getRelativePathOnVolume, getURI, getVolume
 

Method Detail

getAppendOutputStream

java.io.OutputStream getAppendOutputStream()
Returns an output stream for appending to the existing file contents.

Returns:
an OutputStream ready to append to the file contents

getAppendWriter

java.io.Writer getAppendWriter()
Returns a writer for appending to the existing file contents.

Returns:
a Writer ready to append to the file contents

getContentMIMEType

java.lang.String getContentMIMEType()
Returns the MIME type for the contents of this file.

Returns:
a String holding the MIME type for the contents of this file

getInputStream

java.io.InputStream getInputStream()
Returns an input stream for reading the file contents.

Returns:
an InputStream ready to read the file contents

getOutputStream

java.io.OutputStream getOutputStream()
Returns an ouptut stream for writing the file contents.

Returns:
an OutputStream ready to write the file contents

getReader

java.io.Reader getReader()
Returns a reader for reading the file contents.

Returns:
a Reader ready to read the file contents

getWriter

java.io.Writer getWriter()
Returns a writer for writing the file contents.

Returns:
a Writer ready to wrote the file contents

toLocal

VFile toLocal()
Returns this virtual file as a local entry, which may simply be this object. For example if this instance where a remote file accessed over HTTP, this method should cache the file and return a virtual file for that local copy.

Specified by:
toLocal in interface VEntry
Returns:
a VEntry for a local copy of this entry


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.