Mono Class Library: System.Xml.XmlWriter Overview | Members

System.Xml.XmlWriter.WriteBase64 Method

Encodes the specified binary bytes as Base64 and writes out the resulting text.

public abstract void WriteBase64 (byte[] buffer, int index, int count)

Parameters

buffer
A byte array containing the bytes to encode.
index
A int specifying the position within the array of the first byte to encode.
count
A int specifying the number of bytes to encode.

Exceptions

TypeReason
ArgumentNullExceptionbuffer is null.
ArgumentExceptionThe buffer length minus index is less than count.
ArgumentOutOfRangeExceptionindex or count is less than zero.
InvalidOperationExceptionThe XmlWriter.WriteState is WriteState.Closed.

Remarks

Note: Base64 encoding represents byte sequences in a text form comprised of the 65 US-ASCII characters (A-Z, a-z, 0-9, +, / ,= ) where each character encodes 6 bits of the binary data. For more information on Base64 encoding, see RFC 2045 ( http://www.ietf.org/rfc/rfc2045).

Operation
As described above.

Note to Inheritors
This method must be overridden in order to provide the functionality described above, as there is no default implementation.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0