public void close ( ) throws IOException { if ( open ) { if ( residual . length ( ) > 0 ) { throw new IOException ( "Base64 error - data is not properly" + "padded to 4-character groups." ) ; } stream . close ( ) ; open = false ; } }
Close the writer . If there are any residual characters at this point the data stream was not a valid Base64 encoding .