Table of Contents

Remove Method

Definition

Namespace
Cuemon.Text
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Text/ByteOrderMark.cs

Remove(Stream, Encoding, Action<DisposableOptions>)

Removes the preamble, if present, from the specified stream.

public static Stream Remove(Stream value, Encoding encoding, Action<DisposableOptions> setup = null)

Parameters

value Stream

The stream to process.

encoding Encoding

The encoding used to determine which preamble to remove.

setup Action<DisposableOptions>

The delegate that configures disposable behavior.

Returns

Stream

A stream whose content does not include the detected preamble.

Exceptions

ArgumentNullException

value or encoding is null.

Remove(byte[], Encoding)

Removes the preamble, if present, from the specified byte array.

public static byte[] Remove(byte[] bytes, Encoding encoding)

Parameters

bytes byte[]

The byte array to process.

encoding Encoding

The encoding used to determine which preamble to remove.

Returns

byte[]

A byte array whose content does not include the detected preamble.

Exceptions

ArgumentNullException

bytes or encoding is null.