You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2014/11/01 15:19:04 UTC

svn commit: r1635952 - in /commons/proper/codec/trunk/src: changes/changes.xml main/java/org/apache/commons/codec/binary/Base32OutputStream.java main/java/org/apache/commons/codec/binary/Base64OutputStream.java

Author: tn
Date: Sat Nov  1 14:19:04 2014
New Revision: 1635952

URL: http://svn.apache.org/r1635952
Log:
[CODEC-191] Added clarification to Base32 and Base64 OutputStream that calling close() is mandatory.

Modified:
    commons/proper/codec/trunk/src/changes/changes.xml
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java

Modified: commons/proper/codec/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/changes/changes.xml?rev=1635952&r1=1635951&r2=1635952&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/changes/changes.xml (original)
+++ commons/proper/codec/trunk/src/changes/changes.xml Sat Nov  1 14:19:04 2014
@@ -42,7 +42,8 @@ The <action> type attribute can be add,u
     <author>Gary Gregory</author>
   </properties>
   <body>
-    <release version="1.10" date="DD Mmmm 2014" description="Feature and fix release."> 
+    <release version="1.10" date="DD Mmmm 2014" description="Feature and fix release.">
+      <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>   
       <action dev="ggregory" type="fix" issue="CODEC-188" due-to="Hendrik Saly">Add support for HMAC Message Authentication Code (MAC) digests</action>   
       <action dev="ggregory" type="fix" issue="CODEC-187" due-to="Michael Tobias, Thomas Neidhart">Beider Morse Phonetic Matching producing incorrect tokens</action>   
       <action dev="ggregory" type="fix" issue="CODEC-184" due-to="Cyrille Artho">NullPointerException in DoubleMetaPhone.isDoubleMetaphoneEqual when using empty strings</action>   

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java?rev=1635952&r1=1635951&r2=1635952&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java Sat Nov  1 14:19:04 2014
@@ -31,6 +31,10 @@ import java.io.OutputStream;
  * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode
  * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).
  * </p>
+ * <p>
+ * <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the
+ * final padding will be omitted and the resulting data will be incomplete/inconsistent.
+ * </p>
  *
  * @version $Id$
  * @see <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java?rev=1635952&r1=1635951&r2=1635952&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java Sat Nov  1 14:19:04 2014
@@ -35,6 +35,10 @@ import java.io.OutputStream;
  * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode
  * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).
  * </p>
+ * <p>
+ * <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the
+ * final padding will be omitted and the resulting data will be incomplete/inconsistent.
+ * </p>
  *
  * @version $Id$
  * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>