Skip to content

Commit d2d7574

Browse files
committed
[CODEC-191] Added clarification to Base32 and Base64 OutputStream that calling close() is mandatory.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1635952 13f79535-47bb-0310-9956-ffa450edef68
1 parent 05bcf7d commit d2d7574

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/changes/changes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ The <action> type attribute can be add,update,fix,remove.
4242
<author>Gary Gregory</author>
4343
</properties>
4444
<body>
45-
<release version="1.10" date="DD Mmmm 2014" description="Feature and fix release.">
45+
<release version="1.10" date="DD Mmmm 2014" description="Feature and fix release.">
46+
<action dev="tn" type="fix" issue="CODEC-191" due-to="Igor Savin">Added clarification to the javadoc of Base[32|64]OutputStream that it is mandatory to call close()</action>
4647
<action dev="ggregory" type="fix" issue="CODEC-188" due-to="Hendrik Saly">Add support for HMAC Message Authentication Code (MAC) digests</action>
4748
<action dev="ggregory" type="fix" issue="CODEC-187" due-to="Michael Tobias, Thomas Neidhart">Beider Morse Phonetic Matching producing incorrect tokens</action>
4849
<action dev="ggregory" type="fix" issue="CODEC-184" due-to="Cyrille Artho">NullPointerException in DoubleMetaPhone.isDoubleMetaphoneEqual when using empty strings</action>

src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
* Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode
3232
* character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).
3333
* </p>
34+
* <p>
35+
* <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the
36+
* final padding will be omitted and the resulting data will be incomplete/inconsistent.
37+
* </p>
3438
*
3539
* @version $Id$
3640
* @see <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>

src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
* Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode
3636
* character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).
3737
* </p>
38+
* <p>
39+
* <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the
40+
* final padding will be omitted and the resulting data will be incomplete/inconsistent.
41+
* </p>
3842
*
3943
* @version $Id$
4044
* @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>

0 commit comments

Comments
 (0)