org.millscript.commons.vfs.mime
Interface MIMETypeHandler

All Known Implementing Classes:
AbstractMIMETypeHandler, ZipMIMEHandler

public interface MIMETypeHandler

This interface specifies a virtual filesystem MIME type handler, for resolving a specified MIME type into a new virtual filesystem object.


Method Summary
 VFile resolveAsFile(VFile file)
          Resolves the specified VFile to a virtual file in a new virtual filesystem.
 VFolder resolveAsFolder(VFile file)
          Resolves the specified VFile to a virtual folder in a new virtual filesystem.
 VVolume resolveAsVolume(VFile file)
          Resolves the specified VFile to a new virtual filesystem volume.
 

Method Detail

resolveAsFile

VFile resolveAsFile(VFile file)
Resolves the specified VFile to a virtual file in a new virtual filesystem. The returned virtual file will belong to a virtual volume and possibly some virtual folders as well. This is achieved by decoding the file into a virtual file on a new volume.

Parameters:
file - the VFile to make the root volume from
Returns:
a VFile for the specified file URI

resolveAsFolder

VFolder resolveAsFolder(VFile file)
Resolves the specified VFile to a virtual folder in a new virtual filesystem. The returned virtual fiolder will belong to a virtual volume and possibly some virtual folders as well. This is achieved by decoding the file into a new volume and returning the new volumes root folder.

Parameters:
file - the VFile to make the folders root volume from
Returns:
a VFolder for the specified file

resolveAsVolume

VVolume resolveAsVolume(VFile file)
Resolves the specified VFile to a new virtual filesystem volume. This is achieved by decoding the file as an archive, as is appropriate for this MIME type handler. The root of the virtual volume will be the root of decoded archive.

Parameters:
file - the VFile to make the root volume from
Returns:
a VVolume for the specified file


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