More: Don't use DataHelper.readLong() for 1-byte reads, for efficiency

This commit is contained in:
zzz
2015-11-08 20:43:42 +00:00
parent 1aed266f70
commit 1451dc6ece
12 changed files with 14 additions and 14 deletions

View File

@ -215,7 +215,7 @@ public class Certificate extends DataStructureImpl {
throw new DataFormatException("Cert is too small [" + source.length + " off=" + offset + "]");
int cur = offset;
_type = (int)DataHelper.fromLong(source, cur, 1);
_type = source[cur] & 0xff;
cur++;
int length = (int)DataHelper.fromLong(source, cur, 2);
cur += 2;