| | |
| | | * @throws ASN1Exception If the provided array is null or is not between one |
| | | * and four bytes in length. |
| | | */ |
| | | @Override |
| | | public void setValue(byte[] value) |
| | | throws ASN1Exception |
| | | { |
| | |
| | | } |
| | | |
| | | int intValue = 0; |
| | | |
| | | if (value[0] < 0) |
| | | { |
| | | intValue = 0xFFFFFFFF; |
| | | } |
| | | |
| | | for (byte b : value) |
| | | { |
| | | intValue = (intValue << 8) | (b & 0xFF); |
| | |
| | | System.arraycopy(encodedElement, valueStartPos, value, 0, length); |
| | | |
| | | int intValue = 0; |
| | | |
| | | if (value[0] < 0) |
| | | { |
| | | intValue = 0xFFFFFFFF; |
| | | } |
| | | |
| | | for (byte b : value) |
| | | { |
| | | intValue = (intValue << 8) | (b & 0xFF); |
| | |
| | | * |
| | | * @param buffer The buffer to which the information should be appended. |
| | | */ |
| | | @Override |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | buffer.append("ASN1Integer(type="); |
| | |
| | | * @param indent The number of spaces that should be used to indent the |
| | | * resulting string representation. |
| | | */ |
| | | @Override |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | StringBuilder indentBuf = new StringBuilder(indent); |