// Expand a single byte to a byte array publicstaticbyte[] byteToByteArray(byte v, int length) { byte[] result = newbyte[length];
result[0] = v; return result;
}
/* *Convertahexadecimalstringtothecorrespondinglittle-endingnumber *asaBigInteger.TheclearHighBitargumentdetermineswhetherthemost *significantbitofthehighestbyteshouldbesetto0intheresult.
*/ publicstatic
BigInteger hexStringToBigInteger(boolean clearHighBit, String str) {
BigInteger result = BigInteger.ZERO; for (int i = 0; i < str.length() / 2; i++) { int curVal = Character.digit(str.charAt(2 * i), 16);
curVal <<= 4;
curVal += Character.digit(str.charAt(2 * i + 1), 16); if (clearHighBit && i == str.length() / 2 - 1) {
curVal &= 0x7F;
}
result = result.add(BigInteger.valueOf(curVal).shiftLeft(8 * i));
} return result;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.