/** * Flushes and closes (I think, in the superclass) the stream. * * @throws IOException * @since 1.3 */ @Override public void close() throws IOException { try { // 1. Ensure that pending characters are written flushBase64(); } finally { // 2. Actually close the stream // Base class both flushes and closes. super.close(); buffer = null; out = null; } }
/** * Suspends encoding of the stream. May be helpful if you need to embed a piece of base640-encoded data in a stream. * * @throws IOException * @since 1.5.1 */ public void suspendEncoding() throws IOException { flushBase64(); this.suspendEncoding = true; }