@Override
    public final void close() throws IOException {
        if (closed) {
            return;
        }
        closed = true;
        in.close();

        // Throw away the unprocessed data and throw no crypto exceptions.
        // AEAD ciphers are fully readed before closing.  Any authentication
        // exceptions would occur while reading.
        if (!done) {
            ensureCapacity(0);
            try {
                cipher.doFinal(obuffer, 0);
            } catch (Exception e) {
                // Catch exceptions as the rest of the stream is unused.
            }
        }
        obuffer = null;
    }
Closes this input stream and releases any system resources
associated with the stream.
<p>
The <code>close</code> method of <code>CipherInputStream</code>
calls the <code>close</code> method of its underlying input
stream.

@throws IOException if an I/O error occurs.
src/main/java/org/gaul/s3proxy/crypto/DecryptionInputStream.java