edu.harvard.hul.ois.jhove
Class Dump

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

public class Dump
extends java.lang.Object

Common methods for dump utilities.


Constructor Summary
Dump()
          CLASS CONSTRUCTOR.
 
Method Summary
protected static java.lang.String leading(int os, int width)
          Return leading characters to pad out the byte offset to field width.
protected static java.lang.String leading(int os, int width, char pad)
          Return leading characters to pad out the byte offset to field width.
protected static java.lang.String leading(long os, int width)
          Return leading characters to pad out the byte offset to field width.
protected static java.lang.String leading(long os, int width, char pad)
          Return leading characters to pad out the byte offset to field width.
protected static java.lang.String leading(java.lang.String s, int width)
          Return leading characters to pad out the string to field width.
protected static java.lang.String leading(java.lang.String s, int width, char pad)
          Return leading characters to pad out the string to field width.
protected static java.lang.String readChars(java.io.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 Detail

Dump

public Dump()
CLASS CONSTRUCTOR.

Method Detail

leading

protected static java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String leading(java.lang.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 java.lang.String leading(java.lang.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 java.lang.String readChars(java.io.DataInputStream stream,
                                            int length)
                                     throws java.io.IOException
Read and display a sequence of characters.

Parameters:
stream - Data input stream
length - Number of characters
Returns:
Character string
Throws:
java.io.IOException