Class Asn1Decoder

    • Method Detail

      • decode

        public static void decode​(ByteBuffer stream,
                                  Asn1Container container)
                           throws DecoderException
        The decoder main function. This is where we read bytes from the stream and go through the automaton. It's an inifnite loop which stop when no more bytes are to be read. It can occurs if the ByteBuffer is exhausted or if the PDU has been fully decoded.
        Parameters:
        stream - The ByteBuffer containing the PDU to decode
        container - The container that store the state, the result and other elements.
        Throws:
        DecoderException - Thrown if anything went wrong!