import sun.misc.*; import java.io.*; import java.awt.*; public class DecimalDump extends CharacterEncoder { protected int bytesPerAtom() { return 1; } protected int bytesPerLine() { return 16; } protected void encodeAtom(OutputStream aStream, byte data[], int offset, int length) throws IOException { int c = data[offset]; c = c < 0 ? -c + 127 : c; PrintStream p = new PrintStream(aStream); if (c < 100) p.print('0'); if (c < 10) p.print('0'); p.print(String.valueOf(c) + ' '); } }