/** * Return leading characters to pad out the byte offset to field width. * @param os Byte offset * @param width Field width * @return String of leading zeros */ protected static String leading (long os, int width) { return leading (os, width, '0'); }
/** * Return leading characters to pad out the string to field width. * @param s String * @param width Field width * @return String of leading characters */ protected static String leading (String s, int width) { return leading (s, width, '0'); }
/** * Return leading characters to pad out the byte offset to field width. * @param os Byte offset * @param width Field width * @return String of leading zeros */ protected static String leading (int os, int width) { return leading (os, width, '0'); }
/** * Return leading characters to pad out the byte offset to field width. * @param os Byte offset * @param width Field width * @param pad Padding character * @return String of leading characters */ protected static String leading (int os, int width, char pad) { return leading ((long) os, width, pad); }