| | |
| | | |
| | | |
| | | |
| | | import static com.sun.opends.sdk.messages.Messages.*; |
| | | import static com.sun.opends.sdk.messages.Messages.ERR_ASN1_UNEXPECTED_TAG; |
| | | import static org.opends.sdk.asn1.ASN1Constants.*; |
| | | |
| | | import java.io.IOException; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * An abstract {@code ASN1Reader} which can be used as the basis for |
| | | * implementing new ASN1 reader implementations. |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ByteStringBuilder readOctetString(byte type, |
| | | ByteStringBuilder builder) throws IOException |
| | | final ByteStringBuilder builder) throws IOException |
| | | { |
| | | if (type == 0x00) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | private void checkType(byte expectedType) throws IOException |
| | | private void checkType(final byte expectedType) throws IOException |
| | | { |
| | | if (peekType() != expectedType) |
| | | { |
| | | LocalizableMessage message = ERR_ASN1_UNEXPECTED_TAG.get(expectedType, |
| | | peekType()); |
| | | final LocalizableMessage message = ERR_ASN1_UNEXPECTED_TAG.get( |
| | | expectedType, peekType()); |
| | | throw DecodeException.fatalError(message); |
| | | } |
| | | } |