decodeNumeric() публичный Метод

Decode a Numeric type directly from a stream. Decodes INTEGER and ENUMERATED types.
public decodeNumeric ( System in_Renamed, int len ) : Object
in_Renamed System
len int
Результат System.Object
Пример #1
0
        protected int getTaggedIntValue(Asn1Tagged tagVal)
        {
            Asn1Object obj = tagVal.taggedValue();
              byte[] dataBytes = SupportClass.ToByteArray(((Asn1OctetString) obj).byteValue());

              MemoryStream decodedData = new MemoryStream(dataBytes);
              LBERDecoder decoder = new LBERDecoder();

              return ((int) decoder.decodeNumeric(
                decodedData,
                dataBytes.Length));
        }
Пример #2
0
        protected int getTaggedIntValue(Asn1Tagged tagvalue, GeneralEventField tagid)
        {
            Asn1Object obj = tagvalue.taggedValue();

              if ((int)tagid != tagvalue.getIdentifier().Tag)
              {
            throw new IOException("Unknown Tagged Data");
              }

              byte[] dbytes = SupportClass.ToByteArray(((Asn1OctetString) obj).byteValue());
              MemoryStream data = new MemoryStream(dbytes);

              LBERDecoder dec = new LBERDecoder();

              int length = dbytes.Length;

              return (int)(dec.decodeNumeric(data, length));
        }