Author: ggregory
Date: Sat Apr 6 03:49:08 2013
New Revision: 1465178
URL: http://svn.apache.org/r1465178
Log:
Improve toString() for debugging.
Modified:
commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
Modified:
commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
URL:
http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java?rev=1465178&r1=1465177&r2=1465178&view=diff
==============================================================================
---
commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
(original)
+++
commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
Sat Apr 6 03:49:08 2013
@@ -17,6 +17,8 @@
package org.apache.commons.codec.binary;
+import java.util.Arrays;
+
import org.apache.commons.codec.BinaryDecoder;
import org.apache.commons.codec.BinaryEncoder;
import org.apache.commons.codec.DecoderException;
@@ -98,9 +100,9 @@ public abstract class BaseNCodec impleme
@SuppressWarnings("boxing") // OK to ignore boxing here
@Override
public String toString() {
- return String.format("%s[buffer=%s, currentLinePos=%s, eof=%s,
ibitWorkArea=%s, lbitWorkArea=%s, " +
- "modulus=%s, pos=%s, readPos=%s]",
this.getClass().getSimpleName(), buffer, currentLinePos, eof,
- ibitWorkArea, lbitWorkArea, modulus, pos, readPos);
+ return String.format("%s[buffer=%s, currentLinePos=%s, eof=%s,
ibitWorkArea=%s, lbitWorkArea=%s, "
+ + "modulus=%s, pos=%s, readPos=%s]",
this.getClass().getSimpleName(), Arrays.toString(buffer),
+ currentLinePos, eof, ibitWorkArea, lbitWorkArea, modulus,
pos, readPos);
}
}