public static FromHexString ( byte bs, int p ) : |
||
bs | byte | |
p | int | |
return |
public static ObjectId FromHexString(byte[] bs, int p)
{
try
{
int a = RawParseUtils.parseHexInt32(bs, p);
int b = RawParseUtils.parseHexInt32(bs, p + 8);
int c = RawParseUtils.parseHexInt32(bs, p + 16);
int d = RawParseUtils.parseHexInt32(bs, p + 24);
int e = RawParseUtils.parseHexInt32(bs, p + 32);
return new ObjectId(a, b, c, d, e);
}
catch (IndexOutOfRangeException e)
{
throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH, e);
}
}