| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2014 ForgeRock AS. |
| | | * Portions copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.grizzly; |
| | | |
| | |
| | | import org.glassfish.grizzly.memory.CompositeBuffer; |
| | | import org.glassfish.grizzly.memory.MemoryManager; |
| | | |
| | | /** |
| | | * Grizzly ASN1 reader implementation. |
| | | */ |
| | | /** Grizzly ASN1 reader implementation. */ |
| | | final class ASN1BufferReader extends AbstractASN1Reader { |
| | | private final class ChildSequenceLimiter implements SequenceLimiter { |
| | | private SequenceLimiter parent; |
| | |
| | | // Copy the value and construct the element to return. |
| | | // TODO: Is there a more efficient way to do this? |
| | | for (int i = 0; i < peekLength; i++) { |
| | | builder.append(buffer.get()); |
| | | builder.appendByte(buffer.get()); |
| | | } |
| | | |
| | | logger.trace("READ ASN.1 OCTETSTRING(type=0x%x, length=%d)", peekType, peekLength); |