public static boolean compare(String prefix, Map a, Map b) { return compare(prefix, a, b, null, null); }
public static void dumpStack() { debug(getStackTrace(new Exception("Stack trace"), -1, 1)); }
public static String getDebug(String message, byte v[]) { final int max = 250; return getDebug(message, v, max); }
public byte[] writeData(Object o, int byteOrder) throws ImageWriteException { if (o instanceof Byte) return new byte[]{ ((Byte) o).byteValue(), }; else if (o instanceof byte[]) return (byte[]) o; else throw new ImageWriteException("Invalid data: " + o + " (" + Debug.getType(o) + ")"); }
public static void debug(String message, ICC_Profile value) { debug("ICC_Profile " + message + ": " + ((value == null) ? "null" : value.toString())); if (value != null) { debug("\t getProfileClass: " + byteQuadToString(value.getProfileClass())); debug("\t getPCSType: " + byteQuadToString(value.getPCSType())); debug("\t getColorSpaceType() : " + byteQuadToString(value.getColorSpaceType())); } }
public static String getDebug(String message, ICC_Profile value) { StringBuffer result = new StringBuffer(); result.append(getDebug("ICC_Profile " + message + ": " + ((value == null) ? "null" : value.toString())) + newline); if (value != null) { result.append(getDebug("\t getProfileClass: " + byteQuadToString(value.getProfileClass())) + newline); result.append(getDebug("\t getPCSType: " + byteQuadToString(value.getPCSType())) + newline); result.append(getDebug("\t getColorSpaceType() : " + byteQuadToString(value.getColorSpaceType())) + newline); } return result.toString(); }
debug(prefix, "null"); else if (value instanceof Object[]) debug(prefix, array); for (int i = 0; i < array.length; i++) dump(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, "[" + new String(array) + "]"); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]);
public static String getStackTrace(Throwable e, int limit) { return getStackTrace(e, limit, 0); }
public static void debug() { newline(); }
log(buffer, prefix + " both maps null"); return true; log(buffer, prefix + " map a: null, map b: map"); return false; log(buffer, prefix + " map a: map, map b: null"); return false; if (!keys_b.contains(key)) log(buffer, prefix + "b is missing key '" + key + "' from a"); result = false; if (!value_a.equals(value_b)) log(buffer, prefix + "key(" + key + ") value a: " + value_a + ") != b: " + value_b + ")"); result = false; log(buffer, prefix + "a is missing key '" + key + "' from b"); result = false; log(buffer, prefix + "a is the same as b");
public static String getDebug(String message, byte v[]) { final int max = 250; return getDebug(message, v, max); }
public byte[] writeData(Object o, int byteOrder) throws ImageWriteException { if (o instanceof Byte) return new byte[]{ ((Byte) o).byteValue(), }; else if (o instanceof byte[]) return (byte[]) o; else throw new ImageWriteException("Invalid data: " + o + " (" + Debug.getType(o) + ")"); }
public static void debug(String message, ICC_Profile value) { debug("ICC_Profile " + message + ": " + ((value == null) ? "null" : value.toString())); if (value != null) { debug("\t getProfileClass: " + byteQuadToString(value.getProfileClass())); debug("\t getPCSType: " + byteQuadToString(value.getPCSType())); debug("\t getColorSpaceType() : " + byteQuadToString(value.getColorSpaceType())); } }
public static String getDebug(String message, ICC_Profile value) { StringBuffer result = new StringBuffer(); result.append(getDebug("ICC_Profile " + message + ": " + ((value == null) ? "null" : value.toString())) + newline); if (value != null) { result.append(getDebug("\t getProfileClass: " + byteQuadToString(value.getProfileClass())) + newline); result.append(getDebug("\t getPCSType: " + byteQuadToString(value.getPCSType())) + newline); result.append(getDebug("\t getColorSpaceType() : " + byteQuadToString(value.getColorSpaceType())) + newline); } return result.toString(); }
debug(prefix, "null"); else if (value instanceof Object[]) debug(prefix, array); for (int i = 0; i < array.length; i++) dump(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, "[" + new String(array) + "]"); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]); debug(prefix, array); for (int i = 0; i < array.length; i++) debug(prefix + "\t" + i + ": ", array[i]);
public static String getStackTrace(Throwable e) { return getStackTrace(e, -1); }
public static void debug() { newline(); }