ASN.1 OctetString type implementation
Namespace:
SnmpSharpNetAssembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax
Members
| All Members | Constructors | Properties | Methods |
| Member | Description | |
|---|---|---|
| OctetString()()() | Constructor | |
| OctetString(OctetString) | Constructor creating class from values in the supplied class. | |
| OctetString(Byte) |
Constructor. Initialize the class value to a 1 byte array with the supplied value
| |
| OctetString(array<Byte>[]()[]) | Constructs the object and sets the data buffer to the byte array values
| |
| OctetString(String) | Constructs an Octet String with the contents of the supplied string.
| |
| Append(array<Byte>[]()[]) |
Append contents of the byte array to the class value. If class value is length 0, byte array
content is set as the class value.
| |
| Append(String) |
Append string value to the OctetString class. If current class content is length 0, new
string value is set as the value of this class.
Class assumes that string value is UTF8 encoded.
| |
| Clone()()() | Creates a duplicate copy of the object and returns it to the caller. (Overrides AsnType..::.Clone()()().) | |
| decode(array<Byte>[]()[], Int32) |
Decode OctetString from the BER format.
(Overrides AsnType..::.decode(array<Byte>[]()[], Int32).) | |
| encode(MutableByte) | BER encode OctetString variable. (Overrides AsnType..::.encode(MutableByte).) | |
| Equality(OctetString, OctetString) |
Overloading equality operator
| |
| Equals(Object) |
Compare against another object. Acceptable object types are OctetString and
String.
(Overrides Object..::.Equals(Object).) | |
| GetHashCode()()() |
Dummy override to prevent compiler warning messages.
(Overrides Object..::.GetHashCode()()().) | |
| GetType()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| Implicit(OctetString) |
Implicit operator allowing cast of OctetString objects to byte[] array
| |
| Inequality(OctetString, OctetString) |
Negative equality operator
| |
| Item[([(Int32])]) |
Indexed access to the OctetString class data members.
OctetString os = new OctetString("test"); for(int i=0;i<=os.Length;i++) { Console.WriteLine("{0}",os[i]); } | |
| Length | Get length of the internal byte array. 0 if byte array is undefined or zero length. | |
| Reset()()() |
Reset internal buffer to null.
| |
| Set(Byte) |
Set class value to an array 1 byte long and set the value to the supplied argument.
| |
| Set(array<Byte>[]()[]) |
Set class value from the argument byte array. If byte array argument is null or length == 0,
internal OctetString buffer is set to null.
| |
| Set(String) | Set object value to bytes from the supplied string. If argument string length == 0, internal OctetString
buffer is set to null. | |
| Set(Int32, Byte) |
Set value at specified position to the supplied value
| |
| ToArray()()() |
Convert the OctetString class to a byte array. Internal class data buffer is *copied* and not passed to the caller.
| |
| ToHexString()()() |
Return string formatted hexadecimal representation of the objects value.
| |
| ToMACAddressString()()() | Utility function to print a MAC address (binary string of 6 byte length. | |
| ToString()()() | Return string representation of the OctetStrig object. If non-printable characters have been
found in the object, output is a hex representation of the string.
(Overrides Object..::.ToString()()().) | |
| Type |
Return ASN.1 type of the object stored in this or derived class.
(Inherited from AsnType.) |
Inheritance Hierarchy
System..::.Object
SnmpSharpNet..::.AsnType
SnmpSharpNet..::.OctetString
SnmpSharpNet..::.EthernetAddress
SnmpSharpNet..::.IpAddress
SnmpSharpNet..::.Opaque
SnmpSharpNet..::.AsnType
SnmpSharpNet..::.OctetString
SnmpSharpNet..::.EthernetAddress
SnmpSharpNet..::.IpAddress
SnmpSharpNet..::.Opaque