MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / flushBase64

Method flushBase64

java/src/cx/fbn/encrypt/Base64.java:1989–2000  ·  view source on GitHub ↗

Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer without closing the stream. @throws java.io.IOException if there's an error.

()

Source from the content-addressed store, hash-verified

1987 * @throws java.io.IOException if there's an error.
1988 */
1989 public void flushBase64() throws java.io.IOException {
1990 if( position > 0 ) {
1991 if( encode ) {
1992 out.write( encode3to4( b4, buffer, position, options ) );
1993 position = 0;
1994 } // end if: encoding
1995 else {
1996 throw new java.io.IOException( "Base64 input not properly padded." );
1997 } // end else: decoding
1998 } // end if: buffer partially full
1999
2000 } // end flush
2001
2002
2003 /**

Callers 2

closeMethod · 0.95
suspendEncodingMethod · 0.95

Calls 2

encode3to4Method · 0.80
writeMethod · 0.45

Tested by

no test coverage detected