private static void appendAssignmentCode(StringBuilder result, String constantName, int value, String comment) { result.append("public static final int ").append(constantName).append(" = "); Appendables.appendFixedHexDigits(result, value, 32).append("; //").append(comment).append("\n"); }
private static void appendAssignmentCode(StringBuilder result, String constantName, int value, String comment) { result.append("public static final int ").append(constantName).append(" = "); Appendables.appendFixedHexDigits(result, value, 32).append("; //").append(comment).append("\n"); }
private static void appendAssignmentCode(StringBuilder result, String constantName, int value, String comment) { result.append("public static final int ").append(constantName).append(" = "); Appendables.appendFixedHexDigits(result, value, 32).append("; //").append(comment).append("\n"); }
public static <A extends Appendable> A appendHexArray(A target, char left, int[] b, long offset, int mask, char right, int bLength) { try { if (b != null) { int iMax = bLength - 1; if (iMax == -1) { target.append(left).append(right); return target; } target.append(left); for (int i = 0; ; i++) { appendFixedHexDigits(target, 0xFFFFFFFF&b[mask & (int)(i+offset) ], 32); if (i == iMax) return (A) target.append(right); target.append(", "); } } else { target.append("null"); } return target; } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexArray(A target, char left, int[] b, long offset, int mask, char right, int bLength) { try { if (b != null) { int iMax = bLength - 1; if (iMax == -1) { target.append(left).append(right); return target; } target.append(left); for (int i = 0; ; i++) { appendFixedHexDigits(target, 0xFFFFFFFF&b[mask & (int)(i+offset) ], 32); if (i == iMax) return (A) target.append(right); target.append(", "); } } else { target.append("null"); } return target; } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexArray(A target, char left, int[] b, long offset, int mask, char right, int bLength) { try { if (b != null) { int iMax = bLength - 1; if (iMax == -1) { target.append(left).append(right); return target; } target.append(left); for (int i = 0; ; i++) { appendFixedHexDigits(target, 0xFFFFFFFF&b[mask & (int)(i+offset) ], 32); if (i == iMax) return (A) target.append(right); target.append(", "); } } else { target.append("null"); } return target; } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexArray(A target, char left, byte[] b, int offset, int mask, char right, int bLength) { try { if (b != null) { int iMax = bLength - 1; if (iMax == -1) { target.append(left).append(right); return target; } target.append(left); for (int i = 0; ; i++) { appendFixedHexDigits(target, 0xFF&b[mask & (i+offset) ], 8); //appendValue(target,b[mask & (i+offset) ]); //target.append(Integer.toString(a[i])); if (i == iMax) return (A) target.append(right); target.append(", "); } } else { target.append("null"); } return target; } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexArray(A target, char left, byte[] b, int offset, int mask, char right, int bLength) { try { if (b != null) { int iMax = bLength - 1; if (iMax == -1) { target.append(left).append(right); return target; } target.append(left); for (int i = 0; ; i++) { appendFixedHexDigits(target, 0xFF&b[mask & (i+offset) ], 8); //appendValue(target,b[mask & (i+offset) ]); //target.append(Integer.toString(a[i])); if (i == iMax) return (A) target.append(right); target.append(", "); } } else { target.append("null"); } return target; } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexArray(A target, char left, byte[] b, int offset, int mask, char right, int bLength) { try { if (b != null) { int iMax = bLength - 1; if (iMax == -1) { target.append(left).append(right); return target; } target.append(left); for (int i = 0; ; i++) { appendFixedHexDigits(target, 0xFF&b[mask & (i+offset) ], 8); //appendValue(target,b[mask & (i+offset) ]); //target.append(Integer.toString(a[i])); if (i == iMax) return (A) target.append(right); target.append(", "); } } else { target.append("null"); } return target; } catch (IOException ex) { throw new RuntimeException(ex); } }
Appendables.appendFixedHexDigits(out, 0xFF&value.get(), 8);
Appendables.appendFixedHexDigits(out, 0xFF&value.get(), 8);
Appendables.appendFixedHexDigits(out, 0xFF&value.get(), 8);
/** * * @return builder.toString */ public String toString() { StringBuilder builder = new StringBuilder(); builder.append("topic: "); PipeReader.readUTF8(pipe, topic, builder); builder.append(" payload: "); DataInputBlobReader<?> stream = PipeReader.inputStream(pipe, payload); while (stream.hasRemainingBytes()) { Appendables.appendFixedHexDigits(builder, (0xFF&stream.readByte()), 8); if (stream.hasRemainingBytes()) { builder.append(','); } } return builder.toString(); }