|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.jeri.internal.runtime.CharacterEncoder
com.sun.jini.jeri.internal.runtime.HexDumpEncoder
public class HexDumpEncoder
This class encodes a buffer into the classic: "Hexadecimal Dump" format of the past. It is useful for analyzing the contents of binary buffers. The format produced is as follows:
xxxx: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ................Where xxxx is the offset into the buffer in 16 byte chunks, followed by ascii coded hexadecimal bytes followed by the ASCII representation of the bytes or '.' if they are not valid bytes.
Field Summary | |
---|---|
private int |
currentByte
|
private int |
offset
|
private byte[] |
thisLine
|
private int |
thisLineLength
|
Fields inherited from class com.sun.jini.jeri.internal.runtime.CharacterEncoder |
---|
pStream |
Constructor Summary | |
---|---|
HexDumpEncoder()
|
Method Summary | |
---|---|
protected int |
bytesPerAtom()
Return the number of bytes per atom of encoding |
protected int |
bytesPerLine()
Return the number of bytes that can be encoded per line |
protected void |
encodeAtom(OutputStream o,
byte[] buf,
int off,
int len)
Encode one "atom" of information into characters. |
protected void |
encodeBufferPrefix(OutputStream o)
Encode the prefix for the entire buffer. |
protected void |
encodeLinePrefix(OutputStream o,
int len)
Encode the prefix that starts every output line. |
protected void |
encodeLineSuffix(OutputStream o)
Encode the suffix that ends every output line. |
(package private) static void |
hexDigit(PrintStream p,
byte x)
|
Methods inherited from class com.sun.jini.jeri.internal.runtime.CharacterEncoder |
---|
encode, encode, encode, encodeBuffer, encodeBuffer, encodeBuffer, encodeBufferSuffix, readFully |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int offset
private int thisLineLength
private int currentByte
private byte[] thisLine
Constructor Detail |
---|
public HexDumpEncoder()
Method Detail |
---|
static void hexDigit(PrintStream p, byte x)
protected int bytesPerAtom()
CharacterEncoder
bytesPerAtom
in class CharacterEncoder
protected int bytesPerLine()
CharacterEncoder
bytesPerLine
in class CharacterEncoder
protected void encodeBufferPrefix(OutputStream o) throws IOException
CharacterEncoder
encodeBufferPrefix
in class CharacterEncoder
IOException
protected void encodeLinePrefix(OutputStream o, int len) throws IOException
CharacterEncoder
encodeLinePrefix
in class CharacterEncoder
IOException
protected void encodeAtom(OutputStream o, byte[] buf, int off, int len) throws IOException
CharacterEncoder
encodeAtom
in class CharacterEncoder
IOException
protected void encodeLineSuffix(OutputStream o) throws IOException
CharacterEncoder
encodeLineSuffix
in class CharacterEncoder
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |