ASN1C C# Runtime Library  7.8
Public Member Functions | List of all members
Asn1PerInputStream Class Reference
Inheritance diagram for Asn1PerInputStream:
Asn1PerDecodeBuffer Asn1InputStream Asn1DecodeBitBuffer Asn1PerMessageBuffer Asn1DecodeBuffer Asn1MessageBuffer Asn1MessageBufferBase

Public Member Functions

 Asn1PerInputStream (System.IO.Stream istream, bool aligned)
 
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 Asn1PerDecodeBuffer
 Asn1PerDecodeBuffer (byte[] msgdata, bool aligned)
 
 Asn1PerDecodeBuffer (System.IO.Stream istream, bool aligned)
 
virtual void BinDump (System.String varName)
 
virtual void BinDump (System.IO.StreamWriter outs, System.String varName)
 
override void ByteAlign ()
 
virtual bool DecodeBit (System.String ident)
 
override bool DecodeBit ()
 
virtual int DecodeBitsToInt (int nbits, System.String ident)
 
override int DecodeBitsToInt (int nbits)
 
virtual long DecodeBitsToLong (int nbits, System.String ident)
 
override long DecodeBitsToLong (int nbits)
 
virtual void DecodeBitsToOctetArray (byte[] data, int offset, int nbits, System.String ident)
 
virtual void DecodeBitsToOctetArray (byte[] data, int offset, int bitOffset, int nbits, System.String ident)
 
override void DecodeBitsToOctetArray (byte[] data, int offset, int nbits)
 
virtual void DecodeCharString (int nchars, int abpc, int ubpc, Asn1CharSet charSet, System.Text.StringBuilder sbuf)
 
virtual long DecodeConsWholeNumber (long rangeValue, System.String ident)
 
virtual long DecodeConsWholeNumber (long rangeValue, bool retval, System.String ident)
 
virtual long DecodeConsWholeNumber (long rangeValue)
 
virtual long DecodeExtLength ()
 
virtual long DecodeInt (int nocts, bool signExtend, System.String ident)
 
virtual long DecodeInt (int nocts, bool signExtend)
 
virtual long DecodeLength ()
 
virtual long DecodeLength (long lower, long upper)
 
virtual int DecodeSmallLength ()
 
virtual int DecodeSmallNonNegWholeNumber ()
 
virtual long DecodeUnconsLength ()
 
virtual bool IsAligned ()
 
virtual void SetAligned (bool data)
 
void SetSizeConstraint (long lower, long upper)
 
void SetSizeConstraintExt (long lower, long upper, long extLower, long extUpper)
 
- Public Member Functions inherited from Asn1DecodeBitBuffer
 Asn1DecodeBitBuffer (byte[] msgdata)
 
 Asn1DecodeBitBuffer (System.IO.Stream istream)
 
virtual void DecodeBitsToOctetArray (byte[] data, int offset, int bitOffset, int nbits)
 
void MoveBitCursor (long offset)
 
sealed override int ReadByte ()
 
sealed override void SetInputStream (byte[] msgdata, int offset, int length)
 
void SkipBits (long bits)
 
- 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)
 
int [] DecodeOIDContents (int llen)
 
BigInteger [] DecodeOIDContentsBig (int llen)
 
int [] DecodeRelOIDContents (int llen)
 
BigInteger [] DecodeRelOIDContentsBig (int llen)
 
override System.IO.Stream GetInputStream ()
 
virtual void HexDump ()
 
virtual void MarkPos (ref BufferPos bufferPos)
 
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 ResetPos (ref BufferPos bufferPos)
 
void SkipOIDContents (int llen)
 
int [] SkipRelOIDContents (int llen)
 
- 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)
 
- Public Member Functions inherited from Asn1PerMessageBuffer
System.IO.Stream GetInputStream ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Asn1PerDecodeBuffer
static Asn1PerDecodeBuffer SetBuffer (Asn1PerDecodeBuffer buffer, byte[] msgdata, bool aligned)
 
- 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 Asn1PerDecodeBuffer
virtual Asn1PerTraceHandler TraceHandler [get]
 
- Properties inherited from Asn1DecodeBitBuffer
virtual long BitOffset [get]
 
virtual int MsgBitCnt [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]
 
- Properties inherited from Asn1PerMessageBuffer
int MsgBitCnt [get]
 
Asn1PerTraceHandler TraceHandler [get]
 

Detailed Description

This class handles the input stream for decoding of ASN.1 messages as specified in the Packed Encoding Rules (PER) ITU-T X.691 standard.

Constructor & Destructor Documentation

◆ Asn1PerInputStream()

Asn1PerInputStream ( System.IO.Stream  istream,
bool  aligned 
)

This constructor creates a PER input stream 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.
alignedBoolean specifying PER aligned or unaligned encoding.

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 another thread.

Returns
the number of bytes that can be read from this input stream without blocking.
Exceptions
System.SystemExceptionif an I/O error occurs.

Implements Asn1InputStream.

◆ Close()

virtual void Close ( )
virtual

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

Exceptions
System.SystemExceptionif an I/O error occurs.

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
Exceptions
System.SystemExceptionif an I/O error occurs.
Returns
Skipped number of bytes

Implements Asn1InputStream.