class Decoder

in global :: System . Text

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.

  • bytes The address of a buffer that contains the byte sequences to convert.
  • byteCount The number of bytes in to convert.
  • chars The address of a buffer to store the converted characters.
  • charCount The maximum number of characters in to use in the conversion.
  • flush to indicate no further data is to be converted; otherwise, .
  • bytesUsed When this method returns, contains the number of bytes that were produced by the conversion. This parameter is passed uninitialized.
  • charsUsed When this method returns, contains the number of characters from that were used in the conversion. This parameter is passed uninitialized.
  • completed When 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.

  • bytes A byte array to convert.
  • byteIndex The first element of to convert.
  • byteCount The number of elements of to convert.
  • chars An array to store the converted characters.
  • charIndex The first element of in which data is stored.
  • charCount The maximum number of elements of to use in the conversion.
  • flush to indicate that no further data is to be converted; otherwise, .
  • bytesUsed When this method returns, contains the number of bytes that were used in the conversion. This parameter is passed uninitialized.
  • charsUsed When this method returns, contains the number of characters from that were produced by the conversion. This parameter is passed uninitialized.
  • completed When 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.

  • bytes A pointer to the first byte to decode.
  • count The number of bytes to decode.
  • flush to 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.

  • bytes The byte array containing the sequence of bytes to decode.
  • index The index of the first byte to decode.
  • count The 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.

  • bytes The byte array containing the sequence of bytes to decode.
  • index The index of the first byte to decode.
  • count The number of bytes to decode.
  • flush to 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.

  • bytes A pointer to the first byte to decode.
  • byteCount The number of bytes to decode.
  • chars A pointer to the location at which to start writing the resulting set of characters.
  • charCount The maximum number of characters to write.
  • flush to 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.

  • bytes The byte array containing the sequence of bytes to decode.
  • byteIndex The index of the first byte to decode.
  • byteCount The number of bytes to decode.
  • chars The character array to contain the resulting set of characters.
  • charIndex The 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.

  • bytes The byte array containing the sequence of bytes to decode.
  • byteIndex The index of the first byte to decode.
  • byteCount The number of bytes to decode.
  • chars The character array to contain the resulting set of characters.
  • charIndex The index at which to start writing the resulting set of characters.
  • flush to 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.