@Override public UID clone() { return new UID(this.name, this.bytes.clone()); }
@Override protected void toASCII(StringBuilder ascii, int level) { this.indent(ascii, level); ascii.append('"'); for (int i = 0; i < this.bytes.length; i++) { byte b = this.bytes[i]; if (b < 16) ascii.append('0'); ascii.append(Integer.toHexString(b)); } ascii.append('"'); }
@Override protected void toASCIIGnuStep(StringBuilder ascii, int level) { this.toASCII(ascii, level); } }
return ((NSDate)this).getDate(); } else if(this instanceof UID) { return ((UID)this).getBytes(); } else { return this;
/** * There is no XML representation specified for UIDs. * In this implementation UIDs are represented as hexadecimal strings in the XML output. * * @param xml The XML StringBuilder * @param level The indentation level */ @Override void toXML(StringBuilder xml, int level) { this.indent(xml, level); xml.append("<string>"); for (int i = 0; i < this.bytes.length; i++) { byte b = this.bytes[i]; if (b < 16) xml.append('0'); xml.append(Integer.toHexString(b)); } xml.append("</string>"); }
return new UID(String.valueOf(obj), copyOfRange(this.bytes, offset + 1, offset + 1 + length));