bundles/org.tukani.xz/src/org/tukaani/xz/XZOutputStream.java
public void close() throws IOException {
        if (out != null) {
            // If finish() throws an exception, it stores the exception to
            // the variable "exception". So we can ignore the possible
            // exception here.
            try {
                finish();
            } catch (IOException e) {}

            try {
                out.close();
            } catch (IOException e) {
                // Remember the exception but only if there is no previous
                // pending exception.
                if (exception == null)
                    exception = e;
            }

            out = null;
        }

        if (exception != null)
            throw exception;
    }
public void close() throws IOException {
        if (out != null) {
            // If finish() throws an exception, it stores the exception to
            // the variable "exception". So we can ignore the possible
            // exception here.
            try {
                finish();
            } catch (IOException e) {}

            try {
                out.close();
            } catch (IOException e) {
                // Remember the exception but only if there is no previous
                // pending exception.
                if (exception == null)
                    exception = e;
            }

            out = null;
        }

        if (exception != null)
            throw exception;
    }
public void close ( ) throws IOException { if ( out != null ) { // If finish() throws an exception, it stores the exception to // the variable "exception". So we can ignore the possible // exception here. try { finish ( ) ; } catch ( IOException e ) { } try { out . close ( ) ; } catch ( IOException e ) { // Remember the exception but only if there is no previous // pending exception. if ( exception == null ) exception = e ; } out = null ; } if ( exception != null ) throw exception ; }
Finishes compression and closes the underlying stream.
The underlying stream <code>out</code> is closed even if finishing
fails. If both finishing and closing fail, the exception thrown
by <code>finish()</code> is thrown and the exception from the failed
<code>out.close()</code> is lost.

@throws      XZIOException
XZ Stream has grown too big

@throws      IOException may be thrown by the underlying output stream
Finishes compression and closes the underlying stream . The underlying stream <code > out< / code > is closed even if finishing fails . If both finishing and closing fail the exception thrown by <code > finish () < / code > is thrown and the exception from the failed <code > out . close () < / code > is lost .