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
This commit is contained in:
Andrew C. Oliver 2002-09-02 02:08:31 +00:00
parent 147a6b82e6
commit 8b555a177c
1 changed files with 7 additions and 5 deletions

View File

@ -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();
}
/**