Package edu.harvard.hul.ois.jhove
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 Dump()CLASS CONSTRUCTOR.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static Stringleading(int os, int width)Return leading characters to pad out the byte offset to field width.protected static Stringleading(int os, int width, char pad)Return leading characters to pad out the byte offset to field width.protected static Stringleading(long os, int width)Return leading characters to pad out the byte offset to field width.protected static Stringleading(long os, int width, char pad)Return leading characters to pad out the byte offset to field width.protected static Stringleading(String s, int width)Return leading characters to pad out the string to field width.protected static Stringleading(String s, int width, char pad)Return leading characters to pad out the string to field width.protected static StringreadChars(DataInputStream stream, int length)Read and display a sequence of characters.
-
-
-
Method Detail
-
leading
protected static String leading(int os, int width)
Return leading characters to pad out the byte offset to field width.- Parameters:
os- Byte offsetwidth- 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 offsetwidth- 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 offsetwidth- Field widthpad- 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 offsetwidth- Field widthpad- 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- Stringwidth- 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- Stringwidth- Field widthpad- 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 streamlength- Number of characters- Returns:
- Character string
- Throws:
IOException
-
-