private void fromHexString(byte[] bs, int p) { try { w1 = RawParseUtils.parseHexInt32(bs, p); w2 = RawParseUtils.parseHexInt32(bs, p + 8); w3 = RawParseUtils.parseHexInt32(bs, p + 16); w4 = RawParseUtils.parseHexInt32(bs, p + 24); w5 = RawParseUtils.parseHexInt32(bs, p + 32); } catch (ArrayIndexOutOfBoundsException e1) { throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH); } }
private static final ObjectId fromHexString(byte[] bs, int p) { try { final int a = RawParseUtils.parseHexInt32(bs, p); final int b = RawParseUtils.parseHexInt32(bs, p + 8); final int c = RawParseUtils.parseHexInt32(bs, p + 16); final int d = RawParseUtils.parseHexInt32(bs, p + 24); final int e = RawParseUtils.parseHexInt32(bs, p + 32); return new ObjectId(a, b, c, d, e); } catch (ArrayIndexOutOfBoundsException e1) { throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH); } }
private static final int hexUInt32(final byte[] bs, int p, final int end) { if (8 <= end - p) return RawParseUtils.parseHexInt32(bs, p); int r = 0, n = 0; while (n < 8 && p < end) { r <<= 4; r |= RawParseUtils.parseHexInt4(bs[p++]); n++; } return r << (8 - n) * 4; }
static int parse32(byte[] src, int pos) { return RawParseUtils.parseHexInt32(src, pos); }
static int parse32(byte[] src, int pos) { return RawParseUtils.parseHexInt32(src, pos); }
private void fromHexString(byte[] bs, int p) { try { w1 = RawParseUtils.parseHexInt32(bs, p); w2 = RawParseUtils.parseHexInt32(bs, p + 8); w3 = RawParseUtils.parseHexInt32(bs, p + 16); w4 = RawParseUtils.parseHexInt32(bs, p + 24); w5 = RawParseUtils.parseHexInt32(bs, p + 32); } catch (ArrayIndexOutOfBoundsException e1) { throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH); } }
private void fromHexString(final byte[] bs, int p) { try { w1 = RawParseUtils.parseHexInt32(bs, p); w2 = RawParseUtils.parseHexInt32(bs, p + 8); w3 = RawParseUtils.parseHexInt32(bs, p + 16); w4 = RawParseUtils.parseHexInt32(bs, p + 24); w5 = RawParseUtils.parseHexInt32(bs, p + 32); } catch (ArrayIndexOutOfBoundsException e1) { throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH); } }
private static final ObjectId fromHexString(byte[] bs, int p) { try { final int a = RawParseUtils.parseHexInt32(bs, p); final int b = RawParseUtils.parseHexInt32(bs, p + 8); final int c = RawParseUtils.parseHexInt32(bs, p + 16); final int d = RawParseUtils.parseHexInt32(bs, p + 24); final int e = RawParseUtils.parseHexInt32(bs, p + 32); return new ObjectId(a, b, c, d, e); } catch (ArrayIndexOutOfBoundsException e1) { throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH); } }
private static final ObjectId fromHexString(final byte[] bs, int p) { try { final int a = RawParseUtils.parseHexInt32(bs, p); final int b = RawParseUtils.parseHexInt32(bs, p + 8); final int c = RawParseUtils.parseHexInt32(bs, p + 16); final int d = RawParseUtils.parseHexInt32(bs, p + 24); final int e = RawParseUtils.parseHexInt32(bs, p + 32); return new ObjectId(a, b, c, d, e); } catch (ArrayIndexOutOfBoundsException e1) { throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH); } }
private static final int hexUInt32(final byte[] bs, int p, final int end) { if (8 <= end - p) return RawParseUtils.parseHexInt32(bs, p); int r = 0, n = 0; while (n < 8 && p < end) { r <<= 4; r |= RawParseUtils.parseHexInt4(bs[p++]); n++; } return r << (8 - n) * 4; }
private static final int hexUInt32(final byte[] bs, int p, final int end) { if (8 <= end - p) return RawParseUtils.parseHexInt32(bs, p); int r = 0, n = 0; while (n < 8 && p < end) { r <<= 4; r |= RawParseUtils.parseHexInt4(bs[p++]); n++; } return r << (8 - n) * 4; }