ASN1C C# Runtime Library  7.2
Public Member Functions | List of all members
Asn1DerInputStream Class Reference
Inheritance diagram for Asn1DerInputStream:
Asn1DerDecodeBuffer Asn1InputStream Asn1BerDecodeBuffer Asn1DecodeBuffer Asn1MessageBuffer Asn1MessageBufferBase

Public Member Functions

 Asn1DerInputStream (System.IO.Stream istream)
 
virtual int Available ()
 
virtual void Close ()
 
override void Mark ()
 
virtual bool MarkSupported ()
 
override void Reset ()
 
override long Skip (long nbytes)
 
- Public Member Functions inherited from Asn1DerDecodeBuffer
 Asn1DerDecodeBuffer (byte[] msgdata)
 
 Asn1DerDecodeBuffer (System.IO.Stream istream)
 
- Public Member Functions inherited from Asn1BerDecodeBuffer
 Asn1BerDecodeBuffer (byte[] msgdata)
 
 Asn1BerDecodeBuffer (System.IO.Stream istream)
 
int DecodeEnumValue (bool explicitTagging, int implicitLength)
 
int DecodeEnumValue (Asn1Tag tag, bool explicitTagging, int implicitLength)
 
virtual int DecodeLength ()
 
virtual byte [] DecodeOpenType ()
 
virtual byte [] DecodeOpenType (bool saveData)
 
virtual void DecodeTag (Asn1Tag tag)
 
virtual int DecodeTagAndLength (Asn1Tag tag)
 
virtual bool MatchTag (short tagClass, short tagForm, int tagIDCode, Asn1Tag parsedTag, IntHolder parsedLen)
 
virtual bool MatchTag (Asn1Tag tag, Asn1Tag parsedTag, IntHolder parsedLen)
 
virtual bool MatchTag (Asn1Tag tag)
 
virtual void Parse (Asn1TaggedEventHandler handler)
 
virtual void PeekTag (Asn1Tag parsedTag)
 
virtual Asn1Tag PeekTag ()
 
override int ReadByte ()
 
- Public Member Functions inherited from Asn1DecodeBuffer
virtual void AddCaptureBuffer (System.IO.MemoryStream buffer)
 
virtual void Capture (int nbytes)
 
virtual long DecodeIntValue (int length, bool signExtend)
 
virtual int [] DecodeOIDContents (int llen)
 
virtual int [] DecodeRelOIDContents (int llen)
 
override System.IO.Stream GetInputStream ()
 
virtual void HexDump ()
 
virtual int Read ()
 
virtual void Read (byte[] buffer, int offset, int nbytes)
 
virtual void Read (byte[] buffer)
 
int Read2Bytes ()
 
int Read4Bytes ()
 
virtual void RemoveCaptureBuffer (System.IO.MemoryStream buffer)
 
virtual void SetInputStream (byte[] msgdata, int offset, int length)
 
- Public Member Functions inherited from Asn1MessageBuffer
virtual void AddNamedEventHandler (Asn1NamedEventHandler handler)
 
virtual void InvokeCharacters (System.String svalue)
 
virtual void InvokeEndElement (System.String name, int index)
 
virtual void InvokeStartElement (System.String name, int index)
 
- Public Member Functions inherited from Asn1MessageBufferBase
void SetKey (byte[] rtkey)
 
void SetPermanentKey (byte[] rtkey)
 

Additional Inherited Members

- Static Public Member Functions inherited from Asn1BerDecodeBuffer
static int CalcIndefLen (byte[] data, int offset, int len)
 
- Static Public Member Functions inherited from Asn1MessageBufferBase
static void HexDump (System.IO.Stream ins, System.IO.StreamWriter outs)
 
static void HexDump (System.IO.Stream ins)
 
- Properties inherited from Asn1BerDecodeBuffer
virtual Asn1Tag LastTag [get]
 
- Properties inherited from Asn1DecodeBuffer
virtual int ByteCount [get]
 
bool LazyOpenTypeDecode [get, set]
 
- Properties inherited from Asn1MessageBuffer
virtual Asn1MessageBuffer EventHandlerList [set]
 
- Properties inherited from Asn1MessageBufferBase
Asn1Context Context [get]
 
virtual short TypeCode [set]
 

Detailed Description

This class handles the input stream for the decoding of ASN.1 messages as specified in the Distinguished Encoding Rules (DER) as documented in the ITU-T X.690 standard.

Constructor & Destructor Documentation

◆ Asn1DerInputStream()

Asn1DerInputStream ( System.IO.Stream  istream)

This constructor creates a DER decode buffer object that references an encoded ASN.1 message. In this case, the message is passed in using an System.IO.Stream object.

Parameters
istreamInput stream containing an encoded ASN.1 message.

Member Function Documentation

◆ Available()

virtual int Available ( )
virtual

Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or or another thread.

Throws, Exception thrown by C# System.IO.Stream for I/O error

Returns
the number of bytes that can be read from this input stream without blocking.

Implements Asn1InputStream.

◆ Close()

virtual void Close ( )
virtual

Closes this input stream and releases any system resources associated with the stream.

Throws, Exception thrown by C# System.IO.Stream for I/O error

Implements Asn1InputStream.

◆ Mark()

override void Mark ( )

This method is used to mark the current position in the input stream for retry processing or reseting the input stream position to current position.

Implements Asn1InputStream.

◆ MarkSupported()

virtual bool MarkSupported ( )
virtual

Tests if this input stream supports the seeking. This method is equivalent to C# CanSeek method of System.IO.Stream.

Returns
true if input stream supports seeking; Otherwise false.

Implements Asn1InputStream.

◆ Reset()

override void Reset ( )

This method is used to reset the current position in the input stream back to the location of the last 'mark' call. It is equivalent to calling 'Stream.Position' to marked location.

Implements Asn1InputStream.

◆ Skip()

override long Skip ( long  nbytes)

This method will skip over the requested number of bytes in the input stream.

Parameters
nbytesNumber of bytes to skip
Returns
Skipped number of bytes

Implements Asn1InputStream.