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.
| Modifier and Type | Field and Description |
|---|---|
private int |
currentByte |
private int |
offset |
private byte[] |
thisLine |
private int |
thisLineLength |
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.
|
(package private) static void |
hexDigit(PrintStream p,
byte x) |
encode, encode, encode, encodeBuffer, encodeBuffer, encodeBuffer, encodeBufferSuffix, readFullyprivate int offset
private int thisLineLength
private int currentByte
private byte[] thisLine
static void hexDigit(PrintStream p, byte x)
protected int bytesPerAtom()
CharacterEncoderbytesPerAtom in class CharacterEncoderprotected int bytesPerLine()
CharacterEncoderbytesPerLine in class CharacterEncoderprotected void encodeBufferPrefix(OutputStream o) throws IOException
CharacterEncoderencodeBufferPrefix in class CharacterEncoderIOExceptionprotected void encodeLinePrefix(OutputStream o, int len) throws IOException
CharacterEncoderencodeLinePrefix in class CharacterEncoderIOExceptionprotected void encodeAtom(OutputStream o, byte[] buf, int off, int len) throws IOException
CharacterEncoderencodeAtom in class CharacterEncoderIOExceptionprotected void encodeLineSuffix(OutputStream o) throws IOException
CharacterEncoderencodeLineSuffix in class CharacterEncoderIOExceptionCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.