Package org.nasutekds.server.util

Examples of org.nasutekds.server.util.SizeLimitInputStream


    {
      if(!streamStack.isEmpty())
      {
        // We are reading a sub sequence. Return true as long as we haven't
        // exausted the size limit for the sub sequence sub input stream.
        SizeLimitInputStream subSq = (SizeLimitInputStream)in;
        return (subSq.getSizeLimit() - subSq.getBytesRead() > 0);
      }

      return state != ELEMENT_READ_STATE_NEED_TYPE ||
          needTypeState(true, false);
    }
View Full Code Here


  public void readStartSequence() throws ASN1Exception
  {
    // Read the header if haven't done so already
    peekLength();

    SizeLimitInputStream subStream =
        new SizeLimitInputStream(in, peekLength);

    if(debugEnabled())
    {
      TRACER.debugProtocolElement(DebugLogLevel.VERBOSE,
          String.format("READ ASN.1 SEQUENCE(type=0x%x, length=%d)",
View Full Code Here

      Message message = ERR_ASN1_SEQUENCE_READ_NOT_STARTED.get();
      throw new ASN1Exception(message);
    }

    // Ignore all unused trailing components.
    SizeLimitInputStream subSq = (SizeLimitInputStream)in;
    if(subSq.getSizeLimit() - subSq.getBytesRead() > 0)
    {
      if(debugEnabled())
      {
        TRACER.debugWarning("Ignoring %d unused trailing bytes in " +
            "ASN.1 SEQUENCE", subSq.getSizeLimit() - subSq.getBytesRead());
      }

      try
      {
        subSq.skip(subSq.getSizeLimit() - subSq.getBytesRead());
      }
      catch(IOException ioe)
      {
        Message message =
            ERR_ASN1_READ_ERROR.get(ioe.toString());
View Full Code Here

TOP

Related Classes of org.nasutekds.server.util.SizeLimitInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.