public class Dump extends Object
Constructor and Description |
---|
Dump() |
Modifier and Type | Method and Description |
---|---|
static void |
dumpData(byte[] buf,
int offset,
int len,
PrintStream out)
Outputs a byte array to a PrintStream.
|
static void |
dumpData(byte[] buf,
int offset,
int len,
PrintWriter out)
Outputs a byte array to a PrintWriter.
|
static void |
dumpData(byte[] buf,
PrintStream out)
Outputs a byte array to a PrintStream.
|
static void |
dumpData(byte[] buf,
PrintWriter out)
Outputs a byte array to a PrintWriter.
|
static void |
main(String[] args)
Tests the Dump class.
|
static String |
toString(byte[] buf)
Outputs a byte array to a String.
|
static String |
toString(byte[] buf,
int off,
int len)
Outputs a byte array to a String.
|
static String |
toString(byte[] buf,
int off,
int len,
String header)
Outputs a byte array to a String, including a header line.
|
static String |
toString(byte[] buf,
String header)
Outputs a byte array to a String, including a header line.
|
public static void main(String[] args)
public static void dumpData(byte[] buf, int offset, int len, PrintStream out)
buf
- array to dumpoffset
- the offset in the stream (for display purposes,
not offset into the byte array)len
- the number of bytes to displaypublic static void dumpData(byte[] buf, int offset, int len, PrintWriter out)
buf
- array to dumpoffset
- the offset in the stream (for display purposes,
not offset into the byte array)len
- the number of bytes to displaypublic static void dumpData(byte[] buf, PrintStream out)
buf
- the byte array to dump.public static void dumpData(byte[] buf, PrintWriter out)
buf
- the byte array to dump.public static String toString(byte[] buf, int off, int len)
buf
- the byte array to dump.off
- the offset into the byte array to start from.len
- the length of data to output.public static String toString(byte[] buf)
buf
- the byte array to dump.public static String toString(byte[] buf, String header)
buf
- the byte array to dump.header
- the header that will come before the byte array dump.public static String toString(byte[] buf, int off, int len, String header)
buf
- the byte array to dump.off
- the offset into the byte array to start from.len
- the length of data to output.header
- the header that will come before the byte array dump.Copyright © 2023. All rights reserved.