com.armatiek.infofuze.stream.filesystem.compression.bzip2
Class BZip2ArchiveFile

java.lang.Object
  extended by com.armatiek.infofuze.stream.filesystem.AbstractFile
      extended by com.armatiek.infofuze.stream.filesystem.compression.ArchiveFile
          extended by com.armatiek.infofuze.stream.filesystem.compression.bzip2.BZip2ArchiveFile
All Implemented Interfaces:
FileIf

public class BZip2ArchiveFile
extends ArchiveFile

An BZIP2 archive file.

Author:
Maarten Kroon

Constructor Summary
BZip2ArchiveFile(FileIf file)
           
 
Method Summary
 java.io.InputStream getInputStream()
          Returns the contents of the file as a byte stream.
 java.lang.String getMimeType()
          Returns the mime type/content type of the contents of the file.
 java.util.Iterator<FileIf> listFiles()
          Returns an iterator of files and directories in the directory denoted by this file.
 
Methods inherited from class com.armatiek.infofuze.stream.filesystem.compression.ArchiveFile
canRead, exists, getName, getParent, getParentFile, getPath, hasContent, isDirectory, isFile, isHidden, lastModified, length
 
Methods inherited from class com.armatiek.infofuze.stream.filesystem.AbstractFile
getCharacterEncoding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.armatiek.infofuze.stream.filesystem.FileIf
equals
 

Constructor Detail

BZip2ArchiveFile

public BZip2ArchiveFile(FileIf file)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: FileIf
Returns the contents of the file as a byte stream.

Specified by:
getInputStream in interface FileIf
Overrides:
getInputStream in class ArchiveFile
Returns:
an InputStream providing the contents of the file as a stream of bytes.
Throws:
java.io.IOException

getMimeType

public java.lang.String getMimeType()
Description copied from interface: FileIf
Returns the mime type/content type of the contents of the file.

Specified by:
getMimeType in interface FileIf
Overrides:
getMimeType in class AbstractFile
Returns:
a String specifying the mime type, for example, text/html

listFiles

public java.util.Iterator<FileIf> listFiles()
Description copied from interface: FileIf
Returns an iterator of files and directories in the directory denoted by this file. If this file does not denote a directory, then this method returns null. Otherwise an iterator of files is returned, one for each file or directory in the directory. Files denoting the directory itself and the directory's parent directory are not included in the result.

Specified by:
listFiles in interface FileIf
Overrides:
listFiles in class AbstractFile
Returns:
An iterator of FileIf interfaces of the files and directories in the directory denoted by this file. The iterator will be empty if the directory is empty. Returns null if this file does not denote a directory, or if an I/O error occurs.