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 | |
| private int | |
| protected PrintStream | pStream
Stream that understands "printing" |
| private final byte[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | |
| protected int | |
| public void | encode(InputStream inStream, OutputStream outStream)
Encode bytes from the input stream, and write them as text characters to the output stream. |
| public String | encode(byte[] aBuffer)
A 'streamless' version of encode that simply takes a buffer of bytes and returns a string containing the encoded buffer. |
| public String | encode(ByteBuffer aBuffer)
A 'streamless' version of encode that simply takes a ByteBuffer and returns a string containing the encoded buffer. |
| protected void | |
| public void | encodeBuffer(InputStream inStream, OutputStream outStream)
Encode bytes from the input stream, and write them as text characters to the output stream. |
| public void | encodeBuffer(byte[] aBuffer, OutputStream aStream)
Encode the buffer in aBuffer and write the encoded result to the OutputStream aStream. |
| public String | encodeBuffer(byte[] aBuffer)
A 'streamless' version of encode that simply takes a buffer of bytes and returns a string containing the encoded buffer. |
| public void | encodeBuffer(ByteBuffer aBuffer, OutputStream aStream)
Encode the aBuffer ByteBuffer and write the encoded result to the OutputStream aStream. |
| protected void | |
| protected void | |
| protected void | |
| private byte[] | |
| pack-priv static void | |
| protected int | readFully(InputStream in, byte[] buffer)
This method works around the bizarre semantics of BufferedInputStream's read method. |
| currentByte | back to summary |
|---|---|
| private int currentByte | |
| offset | back to summary |
|---|---|
| private int offset | |
| pStream | back to summary |
|---|---|
| protected PrintStream pStream Stream that understands "printing" | |
| thisLine | back to summary |
|---|---|
| private final byte[] thisLine | |
| thisLineLength | back to summary |
|---|---|
| private int thisLineLength | |
| HexDumpEncoder | back to summary |
|---|---|
| public HexDumpEncoder() | |
| bytesPerAtom | back to summary |
|---|---|
| protected int bytesPerAtom() | |
| bytesPerLine | back to summary |
|---|---|
| protected int bytesPerLine() | |
| encode | back to summary |
|---|---|
| public void encode(InputStream inStream, OutputStream outStream) throws IOException Encode bytes from the input stream, and write them as text characters to the output stream. This method will run until it exhausts the input stream, but does not print the line suffix for a final line that is shorter than bytesPerLine(). | |
| encode | back to summary |
|---|---|
| public String encode(byte[] aBuffer) A 'streamless' version of encode that simply takes a buffer of bytes and returns a string containing the encoded buffer. | |
| encode | back to summary |
|---|---|
| public String encode(ByteBuffer aBuffer) A 'streamless' version of encode that simply takes a ByteBuffer and returns a string containing the encoded buffer. The ByteBuffer's position will be advanced to ByteBuffer's limit. | |
| encodeAtom | back to summary |
|---|---|
| protected void encodeAtom(OutputStream o, byte[] buf, int off, int len) throws IOException | |
| encodeBuffer | back to summary |
|---|---|
| public void encodeBuffer(InputStream inStream, OutputStream outStream) throws IOException Encode bytes from the input stream, and write them as text characters to the output stream. This method will run until it exhausts the input stream. It differs from encode in that it will add the line at the end of a final line that is shorter than bytesPerLine(). | |
| encodeBuffer | back to summary |
|---|---|
| public void encodeBuffer(byte[] aBuffer, OutputStream aStream) throws IOException Encode the buffer in aBuffer and write the encoded result to the OutputStream aStream. | |
| encodeBuffer | back to summary |
|---|---|
| public String encodeBuffer(byte[] aBuffer) A 'streamless' version of encode that simply takes a buffer of bytes and returns a string containing the encoded buffer. Returned string is encoded with the ISO-8859-1, also known as ISO-LATIN-1. | |
| encodeBuffer | back to summary |
|---|---|
| public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream) throws IOException Encode the aBuffer ByteBuffer and write the encoded result to the OutputStream aStream. The ByteBuffer's position will be advanced to ByteBuffer's limit. | |
| encodeBufferPrefix | back to summary |
|---|---|
| protected void encodeBufferPrefix(OutputStream o) throws IOException | |
| encodeLinePrefix | back to summary |
|---|---|
| protected void encodeLinePrefix(OutputStream o, int len) | |
| encodeLineSuffix | back to summary |
|---|---|
| protected void encodeLineSuffix(OutputStream o) throws IOException | |
| getBytes | back to summary |
|---|---|
| private byte[] getBytes(ByteBuffer bb) Return a byte array from the remaining bytes in this ByteBuffer. The ByteBuffer's position will be advanced to ByteBuffer's limit. To avoid an extra copy, the implementation will attempt to return the byte array backing the ByteBuffer. If this is not possible, a new byte array will be created. | |
| hexDigit | back to summary |
|---|---|
| pack-priv static void hexDigit(PrintStream p, byte x) | |
| readFully | back to summary |
|---|---|
| protected int readFully(InputStream in, byte[] buffer) throws IOException This method works around the bizarre semantics of BufferedInputStream's read method. | |