Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.io
Class Dump

    java.lang.Object
      oracle.ifs.utils.io.Dump

    public class Dump

extends java.lang.Object

The Dump class provides a mechanism to "dump" bytes to a PrintStream in a human-readable format. The bytes are displayed in hexadecimal, 16 bytes to a line, followed by an ASCII (actually 1-byte unicode) representation.

Modified:
  lsaenz 07/03/2001 Added toString methods with off, len params., lsaenz 02/01/2001 Added toString methods., lsaenz 01/04/2001 Added support for PrintWriters., lsaenz 01/03/2001 Created.

Constructor Summary
`Dump()`

Method Summary
`static void` | `dumpData(byte[] buf, int offset, int len, java.io.PrintStream out)` Outputs a byte array to a PrintStream.
`static void` | `dumpData(byte[] buf, int offset, int len, java.io.PrintWriter out)` Outputs a byte array to a PrintWriter.
`static void` | `dumpData(byte[] buf, java.io.PrintStream out)` Outputs a byte array to a PrintStream.
`static void` | `dumpData(byte[] buf, java.io.PrintWriter out)` Outputs a byte array to a PrintWriter.
`static void` | `main(java.lang.String[] args)` Tests the Dump class.
`static java.lang.String` | `toString(byte[] buf)` Outputs a byte array to a String.
`static java.lang.String` | `toString(byte[] buf, int off, int len)` Outputs a byte array to a String.
`static java.lang.String` | `toString(byte[] buf, int off, int len, java.lang.String header)` Outputs a byte array to a String, including a header line.
`static java.lang.String` | `toString(byte[] buf, java.lang.String header)` Outputs a byte array to a String, including a header line.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Dump

    public Dump()

Method Detail

### main

    public static void main(java.lang.String[] args)

  Description copied from class: `Dump`
  Tests the Dump class. If no arguments are given, this method dumps 256 random bytes. Otherwise, the first argument is interpreted as a file to dump.

### dumpData

    public static void dumpData(byte[] buf,
                                int offset,
                                int len,
                                java.io.PrintStream out)

  Description copied from class: `Dump`
  Outputs a byte array to a PrintStream.

  Parameters:
    `buf` - array to dump
    `offset` - the offset in the stream (for display purposes, not offset into the byte array)
    `len` - the number of bytes to display

### dumpData

    public static void dumpData(byte[] buf,
                                int offset,
                                int len,
                                java.io.PrintWriter out)

  Description copied from class: `Dump`
  Outputs a byte array to a PrintWriter.

  Parameters:
    `buf` - array to dump
    `offset` - the offset in the stream (for display purposes, not offset into the byte array)
    `len` - the number of bytes to display

### dumpData

    public static void dumpData(byte[] buf,
                                java.io.PrintStream out)

  Description copied from class: `Dump`
  Outputs a byte array to a PrintStream.

  Parameters:
    `buf` - the byte array to dump.

### dumpData

    public static void dumpData(byte[] buf,
                                java.io.PrintWriter out)

  Description copied from class: `Dump`
  Outputs a byte array to a PrintWriter.

  Parameters:
    `buf` - the byte array to dump.

### toString

    public static java.lang.String toString(byte[] buf,
                                            int off,
                                            int len)

  Description copied from class: `Dump`
  Outputs a byte array to a String.

  Parameters:
    `buf` - the byte array to dump.
    `off` - the offset into the byte array to start from.
    `len` - the length of data to output.
  Returns:
    the String dump of the byte array.

### toString

    public static java.lang.String toString(byte[] buf)

  Description copied from class: `Dump`
  Outputs a byte array to a String.

  Parameters:
    `buf` - the byte array to dump.
  Returns:
    the String dump of the byte array.

### toString

    public static java.lang.String toString(byte[] buf,
                                            java.lang.String header)

  Description copied from class: `Dump`
  Outputs a byte array to a String, including a header line.

  Parameters:
    `buf` - the byte array to dump.
    `header` - the header that will come before the byte array dump.
  Returns:
    the String dump of the byte array.

### toString

    public static java.lang.String toString(byte[] buf,
                                            int off,
                                            int len,
                                            java.lang.String header)

  Description copied from class: `Dump`
  Outputs a byte array to a String, including a header line.

  Parameters:
    `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.
  Returns:
    the String dump of the byte array.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD