public DataTypeIdentifier(String s) { utf8 = new Utf8String(s); verify(utf8.wrap().array()); } public DataTypeIdentifier(AbstractUtf8Array utf8) {
/** * Constructs a new global id from a document id string. * * @param id The document id to derive from. */ public GlobalId(IdString id) { byte [] raw = MD5.md5.get().digest(id.toUtf8().wrap().array()); long location = id.getLocation(); this.raw = new byte [LENGTH]; for (int i = 0; i < 4; ++i) { this.raw[i] = (byte)((location >> (8 * i)) & 0xFF); } for (int i=4; i < LENGTH; i++) { this.raw[i] = raw[i]; } }