Remove Method
Definition
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
valueStreamThe stream to process.
encodingEncodingThe encoding used to determine which preamble to remove.
setupAction<DisposableOptions>The delegate that configures disposable behavior.
Returns
- Stream
A stream whose content does not include the detected preamble.
Exceptions
- ArgumentNullException
valueorencodingis null.
Remove(byte[], Encoding)
Removes the preamble, if present, from the specified byte array.
public static byte[] Remove(byte[] bytes, Encoding encoding)
Parameters
bytesbyte[]The byte array to process.
encodingEncodingThe encoding used to determine which preamble to remove.
Returns
- byte[]
A byte array whose content does not include the detected preamble.
Exceptions
- ArgumentNullException
bytesorencodingis null.