You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/09/11 11:26:06 UTC
DO NOT REPLY [Bug 36597] New: -
[compress] CBZip2InputStream doesn't close the source stream
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36597>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36597
Summary: [compress] CBZip2InputStream doesn't close the source
stream
Product: Commons
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Sandbox
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: hiroki.ata@gmail.com
Hi there,
I used compress component in sandbox via VFS component. And When I accessed
a tbz2 file via VFS, I could not remove the tbz2 file after closing stream.
I checked some codes and I found the reason of the phenomenon.
When a client program accessed a tbz2 file, the code uses TarFileSystem
( org.apache.commons.vfs.provider.tar.TarFileSystem ). TarFileSystem uses
CBZip2InputStream via Bzip2FileObject.wrapInputStream and the source
stream is created from FileInputStream like this:
class TarFileSystem
... snip ...
protected TarInputStream createTarFile(final File file) throws
FileSystemException
... snip ...
else if ("tbz2".equalsIgnoreCase(getRootName().getScheme()))
{
return new TarInputStream(Bzip2FileObject.wrapInputStream(
file.getAbsolutePath(), new FileInputStream(file)));
}
I think CBZip2InputStream should close source stream like BufferedInputStream
and FilteredInputStream.
Could you please consider to close source stream in CBZip2InputStream#close() ?
Thanks,
Hiroki
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org