Class Bzip2FileObject
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileObject<Bzip2FileSystem>
org.apache.commons.vfs2.provider.compressed.CompressedFileFileObject<Bzip2FileSystem>
org.apache.commons.vfs2.provider.bzip2.Bzip2FileObject
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Comparable<FileObject>,- Iterable<FileObject>,- FileObject
the bzip2 file.
- 
Field SummaryFields inherited from class org.apache.commons.vfs2.provider.compressed.CompressedFileFileObjectSIZE_UNDEFINEDFields inherited from class org.apache.commons.vfs2.provider.AbstractFileObjectDEFAULT_BUFFER_SIZEFields inherited from interface org.apache.commons.vfs2.FileObjectEMPTY_ARRAY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedBzip2FileObject(AbstractFileName fileName, FileObject container, Bzip2FileSystem fileSystem) Constructs a new instance.protectedBzip2FileObject(AbstractFileName name, FileObject container, CompressedFileFileSystem fs) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionprotected InputStreamdoGetInputStream(int bufferSize) Creates an input stream to read the file content from.protected OutputStreamdoGetOutputStream(boolean bAppend) Creates an output stream to write the file content to.static InputStreamwrapInputStream(String name, InputStream inputStream) Wraps an input stream in a compressor input stream.Methods inherited from class org.apache.commons.vfs2.provider.compressed.CompressedFileFileObjectcreateFile, doGetContentSize, doGetLastModifiedTime, doGetType, doListChildren, getContainer, isWriteableMethods inherited from class org.apache.commons.vfs2.provider.AbstractFileObjectcanRenameTo, childrenChanged, close, compareTo, copyFrom, createFolder, delete, delete, deleteAll, doAttach, doCreateFileContent, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, doGetInputStream, doGetRandomAccessContent, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsSymbolicLink, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isSymbolicLink, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toStringMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileObjectgetPath, getURIMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
Bzip2FileObjectprotected Bzip2FileObject(AbstractFileName fileName, FileObject container, Bzip2FileSystem fileSystem) Constructs a new instance.- Parameters:
- fileName- the file name.
- container- the container.
- fileSystem- the file system.
 
- 
Bzip2FileObject@Deprecated protected Bzip2FileObject(AbstractFileName name, FileObject container, CompressedFileFileSystem fs) Deprecated.Deprecated since 2.1.- Parameters:
- name- Abstract file name.
- container- My container.
- fs- My file system.
 
 
- 
- 
Method Details- 
wrapInputStreamWraps an input stream in a compressor input stream.- Parameters:
- name- Unused.
- inputStream- The input stream to wrap.
- Returns:
- a new compressor input stream.
- Throws:
- IOException- if the stream content is malformed or an I/O error occurs.
 
- 
doGetInputStreamDescription copied from class:AbstractFileObjectCreates 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. - Overrides:
- doGetInputStreamin class- AbstractFileObject<Bzip2FileSystem>
- Parameters:
- bufferSize- Buffer size hint.
- Returns:
- An InputStream to read the file content.
- Throws:
- Exception- if an error occurs.
 
- 
doGetOutputStreamDescription copied from class:AbstractFileObjectCreates an output stream to write the file content to. Is only called if:- AbstractFileObject.doIsWriteable()returns true.
- AbstractFileObject.doGetType()returns- FileType.FILE, or- AbstractFileObject.doGetType()returns- FileType.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:
- doGetOutputStreamin class- AbstractFileObject<Bzip2FileSystem>
- 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:
- Exception- if an error occurs.
 
 
- 
Bzip2FileObject(AbstractFileName, FileObject, Bzip2FileSystem)instead.