public class

HexDumpEncoder

extends CharacterEncoder
java.lang.Object
   ↳ sun.misc.CharacterEncoder
     ↳ sun.misc.HexDumpEncoder

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class sun.misc.CharacterEncoder
Public Constructors
HexDumpEncoder()
Protected Methods
int bytesPerAtom()
Return the number of bytes per atom of encoding
int bytesPerLine()
Return the number of bytes that can be encoded per line
void encodeAtom(OutputStream o, byte[] buf, int off, int len)
Encode one "atom" of information into characters.
void encodeBufferPrefix(OutputStream o)
Encode the prefix for the entire buffer.
void encodeLinePrefix(OutputStream o, int len)
Encode the prefix that starts every output line.
void encodeLineSuffix(OutputStream o)
Encode the suffix that ends every output line.
[Expand]
Inherited Methods
From class sun.misc.CharacterEncoder
From class java.lang.Object

Public Constructors

public HexDumpEncoder ()

Protected Methods

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.

Throws
IOException

protected void encodeBufferPrefix (OutputStream o)

Encode the prefix for the entire buffer. By default is simply opens the PrintStream for use by the other functions.

Throws
IOException

protected void encodeLinePrefix (OutputStream o, int len)

Encode the prefix that starts every output line.

Throws
IOException

protected void encodeLineSuffix (OutputStream o)

Encode the suffix that ends every output line. By default this method just prints a into the output stream.

Throws
IOException