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 Methods |
From class
sun.misc.CharacterEncoder
abstract
int
|
bytesPerAtom()
Return the number of bytes per atom of encoding
|
abstract
int
|
bytesPerLine()
Return the number of bytes that can be encoded per line
|
void
|
encode(byte[] aBuffer, OutputStream aStream)
Encode the buffer in aBuffer and write the encoded
result to the OutputStream aStream.
|
String
|
encode(ByteBuffer aBuffer)
A 'streamless' version of encode that simply takes a ByteBuffer
and returns a string containing the encoded buffer.
|
void
|
encode(InputStream inStream, OutputStream outStream)
Encode bytes from the input stream, and write them as text characters
to the output stream.
|
String
|
encode(byte[] aBuffer)
A 'streamless' version of encode that simply takes a buffer of
bytes and returns a string containing the encoded buffer.
|
void
|
encode(ByteBuffer aBuffer, OutputStream aStream)
Encode the aBuffer ByteBuffer and write the encoded
result to the OutputStream aStream.
|
abstract
void
|
encodeAtom(OutputStream aStream, byte[] someBytes, int anOffset, int aLength)
Encode one "atom" of information into characters.
|
void
|
encodeBuffer(byte[] aBuffer, OutputStream aStream)
Encode the buffer in aBuffer and write the encoded
result to the OutputStream aStream.
|
String
|
encodeBuffer(ByteBuffer aBuffer)
A 'streamless' version of encode that simply takes a ByteBuffer
and returns a string containing the encoded buffer.
|
void
|
encodeBuffer(InputStream inStream, OutputStream outStream)
Encode bytes from the input stream, and write them as text characters
to the output stream.
|
void
|
encodeBuffer(ByteBuffer aBuffer, OutputStream aStream)
Encode the aBuffer ByteBuffer and write the encoded
result to the OutputStream aStream.
|
String
|
encodeBuffer(byte[] aBuffer)
A 'streamless' version of encode that simply takes a buffer of
bytes and returns a string containing the encoded buffer.
|
void
|
encodeBufferPrefix(OutputStream aStream)
Encode the prefix for the entire buffer.
|
void
|
encodeBufferSuffix(OutputStream aStream)
Encode the suffix for the entire buffer.
|
void
|
encodeLinePrefix(OutputStream aStream, int aLength)
Encode the prefix that starts every output line.
|
void
|
encodeLineSuffix(OutputStream aStream)
Encode the suffix that ends every output line.
|
int
|
readFully(InputStream in, byte[] buffer)
This method works around the bizarre semantics of BufferedInputStream's
read method.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
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.
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.
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. By default
this method just prints a into the output stream.