| | |
| | | */ |
| | | public ArrayList<ASN1Element> elements() |
| | | { |
| | | |
| | | return elements; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setElements(ArrayList<ASN1Element> elements) |
| | | { |
| | | |
| | | if (elements == null) |
| | | { |
| | | this.elements.clear(); |
| | |
| | | public void setValue(byte[] value) |
| | | throws ASN1Exception |
| | | { |
| | | |
| | | if (value == null) |
| | | { |
| | | int msgID = MSGID_ASN1_SEQUENCE_SET_VALUE_NULL; |
| | |
| | | public static ASN1Sequence decodeAsSequence(ASN1Element element) |
| | | throws ASN1Exception |
| | | { |
| | | |
| | | if (element == null) |
| | | { |
| | | int msgID = MSGID_ASN1_SEQUENCE_DECODE_ELEMENT_NULL; |
| | |
| | | public static ASN1Sequence decodeAsSequence(byte[] encodedElement) |
| | | throws ASN1Exception |
| | | { |
| | | |
| | | // First make sure that the array is not null and long enough to contain |
| | | // a valid ASN.1 sequence element. |
| | | if (encodedElement == null) |
| | |
| | | public static ASN1Sequence decodeAsSequence(byte type, byte[] encodedValue) |
| | | throws ASN1Exception |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = decodeElements(encodedValue); |
| | | return new ASN1Sequence(type, encodedValue, elements); |
| | | } |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("ASN1Sequence(type="); |
| | | buffer.append(byteToHex(getType())); |
| | | buffer.append(", values={ "); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | |
| | | StringBuilder indentBuf = new StringBuilder(indent); |
| | | for (int i=0 ; i < indent; i++) |
| | | { |