public class HexDumpEncoder extends CharacterEncoder
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.
pStream
Constructor and Description |
---|
HexDumpEncoder() |
Modifier and Type | Method and Description |
---|---|
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.
|
encode, encode, encode, encodeBuffer, encodeBuffer, encodeBuffer, encodeBufferSuffix, readFully
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
Copyright © 2016–2018. All rights reserved.