class Decoder
Converts a sequence of encoded bytes into a set of characters.
public void Convert( byte* bytes, int byteCount, char* chars, int charCount, bool flush, ref int bytesUsed, ref int charsUsed, ref bool completed )
Converts a buffer of encoded bytes to UTF-16 encoded characters and stores the result in another buffer.
bytesThe address of a buffer that contains the byte sequences to convert.byteCountThe number of bytes in to convert.charsThe address of a buffer to store the converted characters.charCountThe maximum number of characters in to use in the conversion.flushto indicate no further data is to be converted; otherwise, .bytesUsedWhen this method returns, contains the number of bytes that were produced by the conversion. This parameter is passed uninitialized.charsUsedWhen this method returns, contains the number of characters from that were used in the conversion. This parameter is passed uninitialized.completedWhen this method returns, contains if all the characters specified by were converted; otherwise, . This parameter is passed uninitialized.
public void Convert( byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, ref int bytesUsed, ref int charsUsed, ref bool completed )
Converts an array of encoded bytes to UTF-16 encoded characters and stores the result in a character array.
bytesA byte array to convert.byteIndexThe first element of to convert.byteCountThe number of elements of to convert.charsAn array to store the converted characters.charIndexThe first element of in which data is stored.charCountThe maximum number of elements of to use in the conversion.flushto indicate that no further data is to be converted; otherwise, .bytesUsedWhen this method returns, contains the number of bytes that were used in the conversion. This parameter is passed uninitialized.charsUsedWhen this method returns, contains the number of characters from that were produced by the conversion. This parameter is passed uninitialized.completedWhen this method returns, contains if all the characters specified by were converted; otherwise, . This parameter is passed uninitialized.
public DecoderFallback Fallback { get; set; }
Gets or sets a object for the current object.
- Returns A object.
public DecoderFallbackBuffer FallbackBuffer { get; }
Gets the object associated with the current object.
- Returns A object.
public int GetCharCount( byte* bytes, int count, bool flush )
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer. A parameter indicates whether to clear the internal state of the decoder after the calculation.
bytesA pointer to the first byte to decode.countThe number of bytes to decode.flushto simulate clearing the internal state of the encoder after the calculation; otherwise, .- Returns The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.
public int GetCharCount( byte[] bytes, int index, int count )
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
bytesThe byte array containing the sequence of bytes to decode.indexThe index of the first byte to decode.countThe number of bytes to decode.- Returns The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.
public int GetCharCount( byte[] bytes, int index, int count, bool flush )
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. A parameter indicates whether to clear the internal state of the decoder after the calculation.
bytesThe byte array containing the sequence of bytes to decode.indexThe index of the first byte to decode.countThe number of bytes to decode.flushto simulate clearing the internal state of the encoder after the calculation; otherwise, .- Returns The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.
public int GetChars( byte* bytes, int byteCount, char* chars, int charCount, bool flush )
When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer and any bytes in the internal buffer into a set of characters that are stored starting at the specified character pointer. A parameter indicates whether to clear the internal state of the decoder after the conversion.
bytesA pointer to the first byte to decode.byteCountThe number of bytes to decode.charsA pointer to the location at which to start writing the resulting set of characters.charCountThe maximum number of characters to write.flushto clear the internal state of the decoder after the conversion; otherwise, .- Returns The actual number of characters written at the location indicated by the parameter.
public int GetChars( byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex )
When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array.
bytesThe byte array containing the sequence of bytes to decode.byteIndexThe index of the first byte to decode.byteCountThe number of bytes to decode.charsThe character array to contain the resulting set of characters.charIndexThe index at which to start writing the resulting set of characters.- Returns The actual number of characters written into .
public int GetChars( byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush )
When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array. A parameter indicates whether to clear the internal state of the decoder after the conversion.
bytesThe byte array containing the sequence of bytes to decode.byteIndexThe index of the first byte to decode.byteCountThe number of bytes to decode.charsThe character array to contain the resulting set of characters.charIndexThe index at which to start writing the resulting set of characters.flushto clear the internal state of the decoder after the conversion; otherwise, .- Returns The actual number of characters written into the parameter.
public int GetChars( ReadOnlySpan<byte> bytes, Span<char> chars, bool flush )
😔 No documentation found.
public int GetCharCount( ReadOnlySpan<byte> bytes, bool flush )
😔 No documentation found.
public void Reset( )
😔 No documentation found.
public void Convert( ReadOnlySpan<byte> bytes, Span<char> chars, bool flush, ref int bytesUsed, ref int charsUsed, ref bool completed )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.