Class OERInputStream

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OERInputStream.Choice  
      static class  OERInputStream.Sequence
      OER sequence decoder, decodes prefix and determines which optional parts are available.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.PrintWriter debugOutput  
      protected java.io.PrintWriter debugStream  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      OERInputStream​(java.io.InputStream src)
      Root decoder of OER streaming data.
      OERInputStream​(java.io.InputStream src, int maxByteAllocation)
      Create an OER input and set the maximum byte array allocation size;
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      OERInputStream.Choice choice()  
      protected void debugPrint​(java.lang.String what)  
      java.math.BigInteger enumeration()  
      java.math.BigInteger int16()  
      java.math.BigInteger int32()  
      java.math.BigInteger int64()  
      java.math.BigInteger int8()  
      static org.bouncycastle.asn1.ASN1Encodable parse​(byte[] src, Element element)
      Decode byte array.
      org.bouncycastle.asn1.ASN1Object parse​(Element element)  
      java.math.BigInteger parseInt​(boolean unsigned, int size)  
      protected org.bouncycastle.asn1.ASN1Encodable parseOpenType​(Element e)  
      org.bouncycastle.oer.OERInputStream.LengthInfo readLength()
      Reads a length determinant deals with long ans short versions.
      java.math.BigInteger uint16()  
      java.math.BigInteger uint32()  
      java.math.BigInteger uint64()  
      java.math.BigInteger uint8()  
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • debugOutput

        protected java.io.PrintWriter debugOutput
      • debugStream

        protected java.io.PrintWriter debugStream
    • Constructor Detail

      • OERInputStream

        public OERInputStream​(java.io.InputStream src)
        Root decoder of OER streaming data. Maximum byte array allocation is 1Mb
        Parameters:
        src - source stream.
      • OERInputStream

        public OERInputStream​(java.io.InputStream src,
                              int maxByteAllocation)
        Create an OER input and set the maximum byte array allocation size;
        Parameters:
        src - The src.
        maxByteAllocation - the largest byte array that may eb allocated by this parser.
    • Method Detail

      • parse

        public static org.bouncycastle.asn1.ASN1Encodable parse​(byte[] src,
                                                                Element element)
                                                         throws java.io.IOException
        Decode byte array.
        Parameters:
        src - The src
        element - The definition
        Returns:
        Asn1Encodable instance
        Throws:
        java.io.IOException
      • parse

        public org.bouncycastle.asn1.ASN1Object parse​(Element element)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseInt

        public java.math.BigInteger parseInt​(boolean unsigned,
                                             int size)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • uint8

        public java.math.BigInteger uint8()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • uint16

        public java.math.BigInteger uint16()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • uint32

        public java.math.BigInteger uint32()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • uint64

        public java.math.BigInteger uint64()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • int8

        public java.math.BigInteger int8()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • int16

        public java.math.BigInteger int16()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • int32

        public java.math.BigInteger int32()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • int64

        public java.math.BigInteger int64()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readLength

        public org.bouncycastle.oer.OERInputStream.LengthInfo readLength()
                                                                  throws java.io.IOException
        Reads a length determinant deals with long ans short versions.
        Returns:
        Throws:
        java.lang.Exception
        java.io.IOException
      • enumeration

        public java.math.BigInteger enumeration()
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseOpenType

        protected org.bouncycastle.asn1.ASN1Encodable parseOpenType​(Element e)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • debugPrint

        protected void debugPrint​(java.lang.String what)