Show / Hide Table of Contents

    Class StreamConverterExtensions

    This is an extension implementation of the StreamConverter class.

    Inheritance
    System.Object
    StreamConverterExtensions
    Namespace: Cuemon.IO
    Assembly: Cuemon.IO.dll
    Syntax
    public static class StreamConverterExtensions

    Methods

    | Improve this Doc

    RemovePreamble(Stream, Encoding)

    Removes the preamble information (if present) from the specified System.IO.Stream, and source is being closed and disposed.

    Declaration
    public static Stream RemovePreamble(this Stream source, Encoding encoding)
    Parameters
    Type Name Description
    System.IO.Stream source

    The input System.IO.Stream to process.

    System.Text.Encoding encoding

    The encoding to use when determining the preamble to remove.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream without preamble information.

    | Improve this Doc

    ToStream(Byte[])

    Converts the specified value to a System.IO.Stream.

    Declaration
    public static Stream ToStream(this byte[] value)
    Parameters
    Type Name Description
    System.Byte[] value

    The byte array to be converted.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object.

    | Improve this Doc

    ToStream(String, Action<EncodingOptions>)

    Converts the specified value to a System.IO.Stream.

    Declaration
    public static Stream ToStream(this string value, Action<EncodingOptions> setup = null)
    Parameters
    Type Name Description
    System.String value

    The string to be converted.

    System.Action<EncodingOptions> setup

    The EncodingOptions which need to be configured.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object.

    Remarks

    EncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX