public class HexDumpOutputStream extends OutputStream
OutputStream that logs all writes to a specified
Writer, in a hexdump format. Each write operation creates one or
more lines of output, formatted as below:
| Constructor and Description |
|---|
HexDumpOutputStream(PrintWriter out)
Convenience constructor, which shows offset and character output,
with non-printing and non-ASCII characters replaced by spaces.
|
HexDumpOutputStream(PrintWriter out,
char replacement)
The base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying Writer.
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flushpublic HexDumpOutputStream(PrintWriter out, char replacement)
out - All output goes here. Typically, you will want to set
auto-flush on.replacement - The character used to replace non-printing and non-
ASCII characters.public HexDumpOutputStream(PrintWriter out)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOException