org.apache.commons.vfs.provider.gzip
Class GzipFileObject

java.lang.Object
  extended by org.apache.commons.vfs.provider.AbstractFileObject
      extended by org.apache.commons.vfs.provider.compressed.CompressedFileFileObject
          extended by org.apache.commons.vfs.provider.gzip.GzipFileObject
All Implemented Interfaces:
FileObject

public class GzipFileObject
extends CompressedFileFileObject

the gzip file.

Version:
$Revision: 804644 $ $Date: 2009-08-16 10:02:15 +0200 (So, 16. Aug 2009) $
Author:
Mario Ivankovits

Constructor Summary
protected GzipFileObject(FileName name, FileObject container, CompressedFileFileSystem fs)
           
 
Method Summary
protected  java.io.InputStream doGetInputStream()
          Creates an input stream to read the file content from.
protected  java.io.OutputStream doGetOutputStream(boolean bAppend)
          Creates an output stream to write the file content to.
 
Methods inherited from class org.apache.commons.vfs.provider.compressed.CompressedFileFileObject
createFile, doGetContentSize, doGetLastModifiedTime, doGetType, doListChildren, getContainer, isWriteable
 
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileObject
canRenameTo, childrenChanged, childrenChanged, close, copyFrom, createFolder, delete, delete, doAttach, doCreateFileContent, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, doGetRandomAccessContent, doIsHidden, doIsReadable, doIsSameFile, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, doSetLastModifiedTime, doSetLastModTime, endOutput, exists, finalize, findFiles, findFiles, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getName, getOutputStream, getOutputStream, getParent, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isHidden, isReadable, isSameFile, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.commons.vfs.FileObject
canRenameTo, close, copyFrom, createFolder, delete, delete, exists, findFiles, findFiles, getChild, getChildren, getContent, getFileOperations, getFileSystem, getName, getParent, getType, getURL, isAttached, isContentOpen, isHidden, isReadable, moveTo, refresh, resolveFile, resolveFile
 

Constructor Detail

GzipFileObject

protected GzipFileObject(FileName name,
                         FileObject container,
                         CompressedFileFileSystem fs)
Method Detail

doGetInputStream

protected java.io.InputStream doGetInputStream()
                                        throws java.lang.Exception
Description copied from class: AbstractFileObject
Creates an input stream to read the file content from. Is only called if AbstractFileObject.doGetType() returns FileType.FILE.

It is guaranteed that there are no open output streams for this file when this method is called.

The returned stream does not have to be buffered.

Specified by:
doGetInputStream in class AbstractFileObject
Throws:
java.lang.Exception

doGetOutputStream

protected java.io.OutputStream doGetOutputStream(boolean bAppend)
                                          throws java.lang.Exception
Description copied from class: AbstractFileObject
Creates an output stream to write the file content to. Is only called if:

It is guaranteed that there are no open stream (input or output) for this file when this method is called.

The returned stream does not have to be buffered.

This implementation throws an exception.

Overrides:
doGetOutputStream in class AbstractFileObject
Throws:
java.lang.Exception


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.