Class GzipFileObject
- java.lang.Object
-
- org.apache.commons.vfs2.provider.AbstractFileObject<FS>
-
- org.apache.commons.vfs2.provider.compressed.CompressedFileFileObject<GzipFileSystem>
-
- org.apache.commons.vfs2.provider.gzip.GzipFileObject
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Comparable<FileObject>
,java.lang.Iterable<FileObject>
,FileObject
public class GzipFileObject extends CompressedFileFileObject<GzipFileSystem>
the gzip file.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GzipFileObject(AbstractFileName name, FileObject container, CompressedFileFileSystem fs)
Deprecated.protected
GzipFileObject(AbstractFileName name, FileObject container, GzipFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.vfs2.provider.compressed.CompressedFileFileObject
createFile, doGetContentSize, doGetLastModifiedTime, doGetType, doListChildren, getContainer, isWriteable
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFolder, delete, delete, deleteAll, doAttach, doCreateFileContent, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, doGetRandomAccessContent, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toString
-
-
-
-
Constructor Detail
-
GzipFileObject
@Deprecated protected GzipFileObject(AbstractFileName name, FileObject container, CompressedFileFileSystem fs)
Deprecated.Deprecated since 2.1.
-
GzipFileObject
protected GzipFileObject(AbstractFileName name, FileObject container, GzipFileSystem 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 ifAbstractFileObject.doGetType()
returnsFileType.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 classAbstractFileObject<GzipFileSystem>
- Returns:
- An InputStream to read the file content.
- Throws:
java.lang.Exception
- if an error occurs.
-
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:AbstractFileObject.doIsWriteable()
returns true.AbstractFileObject.doGetType()
returnsFileType.FILE
, orAbstractFileObject.doGetType()
returnsFileType.IMAGINARY
, and the file's parent exists and is a folder.
The returned stream does not have to be buffered.
This implementation throws an exception.
- Overrides:
doGetOutputStream
in classAbstractFileObject<GzipFileSystem>
- Parameters:
bAppend
- true if the file should be appended to, false if it should be overwritten.- Returns:
- An OutputStream to write to the file.
- Throws:
java.lang.Exception
- if an error occurs.
-
-