From 8748ed6a08510f907dd14cc358418d0ecfe681ca Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Mon, 2 Sep 2002 02:08:31 +0000 Subject: [PATCH] fixed error with HexDump PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352830 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/util/HexDump.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/poi/util/HexDump.java b/src/java/org/apache/poi/util/HexDump.java index b506c65bba..376b663097 100644 --- a/src/java/org/apache/poi/util/HexDump.java +++ b/src/java/org/apache/poi/util/HexDump.java @@ -118,7 +118,9 @@ public class HexDump { chars_read = 16; } - buffer.append(dump(display_offset)).append(' '); + buffer.append( + dump(display_offset) + ).append(' '); for (int k = 0; k < 16; k++) { if (k < chars_read) @@ -253,7 +255,7 @@ public class HexDump 28, 24, 20, 16, 12, 8, 4, 0 }; - private static StringBuffer dump(final long value) + private static String dump(final long value) { _lbuffer.setLength(0); for (int j = 0; j < 8; j++) @@ -261,17 +263,17 @@ public class HexDump _lbuffer .append(_hexcodes[ (( int ) (value >> _shifts[ j ])) & 15 ]); } - return _lbuffer; + return _lbuffer.toString(); } - private static StringBuffer dump(final byte value) + private static String dump(final byte value) { _cbuffer.setLength(0); for (int j = 0; j < 2; j++) { _cbuffer.append(_hexcodes[ (value >> _shifts[ j + 6 ]) & 15 ]); } - return _cbuffer; + return _cbuffer.toString(); } /** -- 2.39.5