Top Description Fields Constructors Methods
org.tukaani.xz

public Class CloseIgnoringInputStream

extends FilterInputStream
Class Inheritance
Known Direct Subclasses
org.tukaani.xz.CountingInputStream
Imports
java.io.InputStream, .FilterInputStream

An InputStream wrapper whose close() does nothing. This is useful with raw decompressors if you want to call close() to release memory allocated from an ArrayCache but don't want to close the underlying InputStream. For example:
InputStream rawdec = new LZMA2InputStream(
        new CloseIgnoringInputStream(myInputStream),
        myDictSize, null, myArrayCache);
doSomething(rawdec);
rawdec.close(); // This doesn't close myInputStream.

With XZInputStream, SingleXZInputStream, and SeekableXZInputStream you can use their close(boolean) method to avoid closing the underlying InputStream; with those classes CloseIgnoringInputStream isn't needed.

Since
1.7

Field Summary

Inherited from java.io.FilterInputStream:
in

Constructor Summary

AccessConstructor and Description
public
CloseIgnoringInputStream(InputStream in)

Creates a new CloseIgnoringInputStream.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.FilterInputStream.close.

Implements java.io.Closeable.close.

This does nothing (doesn't call in.close()).
Inherited from java.io.FilterInputStream:
availablemarkmarkSupportedreadreadreadresetskip

Constructor Detail

CloseIgnoringInputStreamback to summary
public CloseIgnoringInputStream(InputStream in)

Creates a new CloseIgnoringInputStream.

Method Detail

closeback to summary
public void close()

Overrides java.io.FilterInputStream.close.

Implements java.io.Closeable.close.

This does nothing (doesn't call in.close()).