X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FBase64.java;fp=src%2Fbe%2Fnikiroo%2Futils%2FBase64.java;h=784fc929aef19b9f51c3dcb9f891cb9bb59e3122;hp=476160182475a7d51850a64dafef25ea576782a1;hb=12784931c8ae440fec10dfd6ea97e7b16ba64988;hpb=177e14c96d0c7318ae4a227351186735c9b5f1a6 diff --git a/src/be/nikiroo/utils/Base64.java b/src/be/nikiroo/utils/Base64.java index 4761601..784fc92 100644 --- a/src/be/nikiroo/utils/Base64.java +++ b/src/be/nikiroo/utils/Base64.java @@ -1,5 +1,7 @@ package be.nikiroo.utils; +import java.io.IOException; + /** *

Encodes and decodes to and from Base64 notation.

*

Homepage: http://iharder.net/base64.

@@ -2029,7 +2031,9 @@ class Base64 @Override public void close() throws java.io.IOException { // 1. Ensure that pending characters are written - flushBase64(); + + // niki: removed since it is now in flush() + //flushBase64(); // 2. Actually close the stream // Base class both flushes and closes. @@ -2066,7 +2070,12 @@ class Base64 this.suspendEncoding = false; } // end resumeEncoding - + @Override + // added by niki + public void flush() throws IOException { + flushBase64(); + super.flush(); + } } // end inner class OutputStream