You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/04/03 00:51:40 UTC

svn commit: r1308606 - in /commons/proper/codec/trunk/src: changes/changes.xml main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java

Author: sebb
Date: Mon Apr  2 22:51:39 2012
New Revision: 1308606

URL: http://svn.apache.org/viewvc?rev=1308606&view=rev
Log:
CODEC-138 Complete FilterInputStream interface for BaseNCodecInputStream

Modified:
    commons/proper/codec/trunk/src/changes/changes.xml
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.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=1308606&r1=1308605&r2=1308606&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/changes/changes.xml (original)
+++ commons/proper/codec/trunk/src/changes/changes.xml Mon Apr  2 22:51:39 2012
@@ -31,6 +31,9 @@
     </release>
     -->
     <release version="1.7" date="TBD" description="Feature and fix release.">
+      <action dev="sebb" type="fix" issue="CODEC-138">
+        Complete FilterInputStream interface for BaseNCodecInputStream
+      </action>
       <action dev="ggregory" type="fix" issue="CODEC-136">
         Use Charset objects when possible, create Charsets for required character encodings
       </action>

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java?rev=1308606&r1=1308605&r2=1308606&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java Mon Apr  2 22:51:39 2012
@@ -60,14 +60,25 @@ public class BaseNCodecInputStream exten
     }
 
     /**
+     * Marks the current position in this input stream.
+     * <p>The {@link #mark} method of {@link BaseNCodecInputStream} does nothing.</p>
+     *
+     * @param readLimit the maximum limit of bytes that can be read before the mark position becomes invalid.
+     */
+    @Override
+    public synchronized void mark(int readLimit) {
+    }
+
+    /**
      * {@inheritDoc}
-     * 
-     * @return false
+     *
+     * @return always returns <code>false</code>
      */
     @Override
     public boolean markSupported() {
         return false; // not an easy job to support marks
     }
+
     /**
      * Reads one <code>byte</code> from this input stream.
      * 
@@ -152,6 +163,17 @@ public class BaseNCodecInputStream exten
     }
 
     /**
+     * Repositions this stream to the position at the time the mark method was last called on this input stream.
+     * <p>The {@link #reset} method of {@link BaseNCodecInputStream} does nothing except throw an {@link IOException}.</p>
+     *
+     * @throws IOException if this method is invoked
+     */
+    @Override
+    public synchronized void reset() throws IOException {
+        throw new IOException("mark/reset not supported");
+    }
+
+    /**
      * {@inheritDoc}
      *
      * @throws IllegalArgumentException if the provided skip length is negative