Class Dump

java.lang.Object
edu.harvard.hul.ois.jhove.Dump

public class Dump extends Object
Common methods for dump utilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CLASS CONSTRUCTOR.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static String
    leading(int os, int width)
    Return leading characters to pad out the byte offset to field width.
    protected static String
    leading(int os, int width, char pad)
    Return leading characters to pad out the byte offset to field width.
    protected static String
    leading(long os, int width)
    Return leading characters to pad out the byte offset to field width.
    protected static String
    leading(long os, int width, char pad)
    Return leading characters to pad out the byte offset to field width.
    protected static String
    leading(String s, int width)
    Return leading characters to pad out the string to field width.
    protected static String
    leading(String s, int width, char pad)
    Return leading characters to pad out the string to field width.
    protected static String
    readChars(DataInputStream stream, int length)
    Read and display a sequence of characters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Dump

      public Dump()
      CLASS CONSTRUCTOR.
  • Method Details

    • leading

      protected static String leading(int os, int width)
      Return leading characters to pad out the byte offset to field width.
      Parameters:
      os - Byte offset
      width - Field width
      Returns:
      String of leading zeros
    • leading

      protected static String leading(long os, int width)
      Return leading characters to pad out the byte offset to field width.
      Parameters:
      os - Byte offset
      width - Field width
      Returns:
      String of leading zeros
    • leading

      protected static String leading(int os, int width, char pad)
      Return leading characters to pad out the byte offset to field width.
      Parameters:
      os - Byte offset
      width - Field width
      pad - Padding character
      Returns:
      String of leading characters
    • leading

      protected static String leading(long os, int width, char pad)
      Return leading characters to pad out the byte offset to field width.
      Parameters:
      os - Byte offset
      width - Field width
      pad - Padding character
      Returns:
      String of leading characters
    • leading

      protected static String leading(String s, int width)
      Return leading characters to pad out the string to field width.
      Parameters:
      s - String
      width - Field width
      Returns:
      String of leading characters
    • leading

      protected static String leading(String s, int width, char pad)
      Return leading characters to pad out the string to field width.
      Parameters:
      s - String
      width - Field width
      pad - Padding character
      Returns:
      String of leading characters
    • readChars

      protected static String readChars(DataInputStream stream, int length) throws IOException
      Read and display a sequence of characters.
      Parameters:
      stream - Data input stream
      length - Number of characters
      Returns:
      Character string
      Throws:
      IOException