| File was renamed from opendj-sdk/sdk/src/org/opends/sdk/ldap/ASN1StreamReader.java |
| | |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.sdk.ldap; |
| | | package com.sun.opends.sdk.ldap; |
| | | |
| | | |
| | | |
| | | import static com.sun.opends.sdk.messages.Messages.*; |
| | | import static org.opends.sdk.ldap.LDAPConstants.*; |
| | | import static com.sun.opends.sdk.ldap.LDAPConstants.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.nio.BufferUnderflowException; |
| | |
| | | /** |
| | | * Grizzly ASN1 reader implementation. |
| | | */ |
| | | final class ASN1StreamReader extends AbstractASN1Reader implements |
| | | public final class ASN1StreamReader extends AbstractASN1Reader implements |
| | | PoolableObject, ASN1Reader |
| | | { |
| | | class ChildSequenceLimiter implements SequenceLimiter |
| | |
| | | { |
| | | return false; |
| | | } |
| | | if ((state == ELEMENT_READ_STATE_NEED_ADDITIONAL_LENGTH_BYTES) |
| | | && !needAdditionalLengthBytesState(true)) |
| | | { |
| | | return false; |
| | | } |
| | | return !((state == ELEMENT_READ_STATE_NEED_ADDITIONAL_LENGTH_BYTES) |
| | | && !needAdditionalLengthBytesState(true)) && |
| | | peekLength <= readLimiter.remaining(); |
| | | |
| | | return peekLength <= readLimiter.remaining(); |
| | | } |
| | | |
| | | |