• ASP.NET Core API
  • Core API
  • Mail API
  • Json API
  • Core API
  • Cuemon.IO
  • StreamUtility

    Show / Hide Table of Contents
    • Cuemon
      • ActionFactory
      • ActionFactory<TTuple>
      • ArgumentEmptyException
      • AssignmentOperator
      • AssignmentUtility
      • ByteConverter
      • ByteConverterExtensions
      • ByteExtensions
      • ByteUtility
      • ByteUtilityExtensions
      • CasingMethod
      • CharConverter
      • CharConverterExtensions
      • Condition
      • ConditionBuilder<TTuple>
      • ConditionExtensions
      • Converter
      • ConverterExtensions
      • ConvertibleConverter
      • ConvertibleConverterExtensions
      • DataPair
      • DataPair<T>
      • DateSpan
      • DateTimeConverter
      • DateTimeConverterExtensions
      • DateTimeExtensions
      • DateTimeFormatPattern
      • DayPart
      • DayParts
      • DelegateUtility
      • DelegateUtilityExtensions
      • DoubleConverter
      • DoubleConverterExtensions
      • EnumUtility
      • EnumUtilityExtensions
      • EventUtility
      • ExceptionUtility
      • ExceptionUtilityExtensions
      • FuncFactory
      • FuncFactory<TTuple, TResult>
      • GuidConverter
      • GuidConverterExtensions
      • GuidFormats
      • GuidUtility
      • Hierarchy<T>
      • HierarchyExtensions
      • HierarchySerializer
      • HierarchyUtility
      • HorizontalDirection
      • IData
      • IHierarchy<T>
      • IndexMapping
      • Initializer
      • InitializerBuilder<T>
      • IntegerExtensions
      • IWrapper<T>
      • LatencyException
      • LoopUtility
      • Mapping
      • MappingExtensions
      • MethodWrappedException
      • NumberUtility
      • NumberUtilityExtensions
      • ObjectConverter
      • PreambleSequence
      • RandomSeverity
      • RelationalOperator
      • RoundOffAccuracy
      • SortOrder
      • StandardizedDateTimeFormatPattern
      • StringConverter
      • StringConverterExtensions
      • StringExtensions
      • StringFormatter
      • StringReplacePair
      • StringUtility
      • StringUtilityExtensions
      • StructUtility
      • StructUtilityExtensions
      • TaskActionFactory
      • TaskActionFactory<TTuple>
      • TaskFuncFactory
      • TaskFuncFactory<TTuple, TResult>
      • Template
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8, T9>
      • Template<T1, T2, T3, T4, T5, T6, T7, T8>
      • Template<T1, T2, T3, T4, T5, T6, T7>
      • Template<T1, T2, T3, T4, T5, T6>
      • Template<T1, T2, T3, T4, T5>
      • Template<T1, T2, T3, T4>
      • Template<T1, T2, T3>
      • Template<T1, T2>
      • Template<T1>
      • TemplateFactory<TTuple>
      • TesterDoer
      • TesterFunc<T, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, T7, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, T6, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, T5, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, T4, TResult, TSuccess>
      • TesterFunc<T1, T2, T3, TResult, TSuccess>
      • TesterFunc<T1, T2, TResult, TSuccess>
      • TesterFunc<TResult, TSuccess>
      • TesterFuncFactory
      • TesterFuncFactory<TTuple, TResult, TSuccess>
      • TesterFuncUtility
      • TimeRange
      • TimeSpanConverter
      • TimeSpanConverterExtensions
      • TimeSpanExtensions
      • TimeUnit
      • TransientFaultEvidence
      • TransientFaultException
      • TransientOperation
      • TransientOperationOptions
      • TupleUtility
      • Tweaker
      • TweakerExtensions
      • TypeArgumentException
      • TypeArgumentOutOfRangeException
      • TypeCodeConverter
      • TypeCodeConverterExtensions
      • TypeExtensions
      • TypeUtility
      • TypeUtilityExtensions
      • UriConverter
      • UriScheme
      • UriSchemeConverter
      • UriUtility
      • Validator
      • VersionUtility
      • VerticalDirection
      • Wrapper
      • Wrapper<T>
      • WrapperExtensions
    • Cuemon.Collections
      • DataPairCollection
      • DataPairDictionary
    • Cuemon.Collections.Generic
      • CollectionExtensions
      • ComparisonUtility
      • ConditionalCollection<T>
      • DictionaryConverter
      • DictionaryConverterExtensions
      • DictionaryExtensions
      • DictionaryUtility
      • DictionaryUtilityExtensions
      • DynamicComparer
      • DynamicEqualityComparer
      • EnumerableConverter
      • EnumerableConverterExtensions
      • EnumerableExtensions
      • EnumerableSizeComparer<T>
      • EnumerableUtility
      • EnumerableUtilityExtensions
      • ISortableTable<TSource>
      • ListExtensions
      • ListUtility
      • ListUtilityExtensions
      • PagedCollection
      • PagedCollection<T>
      • PagedCollectionExtensions
      • PagedSettings
      • PartitionCollection<T>
      • PartitionCollectionExtensions
      • ReferenceComparer<T>
    • Cuemon.Collections.Specialized
      • NameValueCollectionConverter
      • NameValueCollectionConverterExtensions
      • NameValueCollectionUtility
    • Cuemon.Configuration
      • Configurable<TOptions>
      • IConfigurable<TOptions>
    • Cuemon.Data
      • BulkCopyDataReader
      • DataAdapter
      • DataAdapterEventArgs
      • DataAdapterException
      • DataCommand
      • DataConnection
      • DataDependency
      • DataManager
      • DataParameterEqualityComparer
      • DataTransfer
      • DataTransferColumn
      • DataTransferColumnCollection
      • DataTransferExtensions
      • DataTransferRow
      • DataTransferRowCollection
      • DataTransferSorter
      • DataWatcher
      • DbColumn
      • IDataCommand
      • IDataConnection
      • InOperator<T>
      • QueryBuilder
      • QueryFormat
      • QueryInsertAction
      • QueryType
      • QueryUtility
      • StringDataReader
      • UniqueIndexViolationException
    • Cuemon.Data.CsvClient
      • CsvDataReader
    • Cuemon.Data.SqlClient
      • SqlDataManager
      • SqlInOperator<T>
      • SqlQueryBuilder
    • Cuemon.Data.XmlClient
      • XmlDataReader
    • Cuemon.Diagnostics
      • EventLogEntryType
      • ExceptionDescriptor
      • ExceptionDescriptorAttribute
      • FileVersionInfoExtensions
      • Profiler
      • ProfilerOptions
      • TimeMeasure
      • TimeMeasureOptions
      • TimeMeasureProfiler
      • TimeMeasureProfiler<TResult>
    • Cuemon.Globalization
      • IMessageLocalizer
      • RegionInfoExtensions
      • World
    • Cuemon.Integrity
      • CacheValidator
      • CacheValidatorExtensions
      • CacheValidatorOptions
      • ChecksumBuilder
      • ChecksumBuilderExtensions
      • ChecksumBuilderOptions
      • ChecksumMethod
      • ChecksumResult
      • ChecksumStrength
      • ICacheableEntity
      • ICacheableIntegrity
      • ICacheableTimestamp
    • Cuemon.IO
      • FileInfoConverter
      • JsonStreamConverter
      • StreamConverter
      • StreamConverterExtensions
      • StreamExtensions
      • StreamUtility
      • StreamUtilityExtensions
      • StreamWriterOptions
      • StreamWriterUtility
      • TextReaderConverter
      • TextReaderConverterExtensions
    • Cuemon.IO.Compression
      • CompressionType
      • CompressionUtility
      • CompressionUtilityExtensions
    • Cuemon.Messaging
      • DynamicCorrelation
      • DynamicRequest
      • ICorrelation
      • IRequest
    • Cuemon.Net
      • HttpStatusCodeExtensions
      • NetDependency
      • NetWatcher
    • Cuemon.Net.Http
      • HttpManager
      • HttpManagerExtensions
      • HttpManagerOptions
      • HttpMethodConverter
      • HttpMethodExtensions
      • HttpMethods
      • HttpRequestOptions
    • Cuemon.Reflection
      • ActivatorUtility
      • AssemblyUtility
      • AssemblyUtilityExtensions
      • MemberInfoExtensions
      • MethodBaseConverter
      • MethodBaseConverterExtensions
      • MethodDescriptor
      • ObjectHierarchyOptions
      • ParameterSignature
      • ReflectionUtility
      • ReflectionUtilityExtensions
      • ResourceMatch
    • Cuemon.Runtime
      • Dependency
      • DependencyEventArgs
      • IDependency
      • Watcher
      • WatcherEventArgs
    • Cuemon.Runtime.Caching
      • CacheCollection
      • CacheEventArgs
      • CachingManager
    • Cuemon.Runtime.Serialization
      • JsonConverter
      • JsonInstance
      • JsonInstanceCollection
      • JsonWriter
      • XmlJsonInstance
    • Cuemon.Security
      • Obfuscator
      • ObfuscatorMapping
      • SecureXmlObfuscator
      • SecurityToken
      • SecurityTokenSettings
      • SecurityUtility
      • XmlObfuscator
    • Cuemon.Security.Cryptography
      • AdvancedEncryptionStandardKeySize
      • AdvancedEncryptionStandardUtility
      • CyclicRedundancyCheck
      • CyclicRedundancyCheck32
      • HashAlgorithmType
      • HashOptions
      • HashResult
      • HashUtility
      • HashUtilityExtensions
      • HmacAlgorithmType
      • HmacUtility
      • HmacUtilityExtensions
      • KeyedHashOptions
      • PolynomialRepresentation
      • StreamHashOptions
      • StreamKeyedHashOptions
      • StringHashOptions
      • StringKeyedHashOptions
      • StrongNumberUtility
    • Cuemon.Security.Web
      • JsonWebToken
      • JsonWebTokenHashAlgorithm
      • JsonWebTokenHashAlgorithmConverter
      • JsonWebTokenHeader
      • JsonWebTokenPayload
    • Cuemon.Serialization
      • ExceptionDescriptorSerializationOptions
    • Cuemon.Serialization.Formatters
      • Formatter<TFormat>
      • FormatterExtensions
    • Cuemon.Serialization.Xml
      • DynamicXmlConverter
      • DynamicXmlSerializable
      • XmlConvert
      • XmlReaderExtensions
      • XmlSerializer
      • XmlSerializerSettings
      • XmlSerializerSettingsExtensions
      • XmlWriterExtensions
    • Cuemon.Serialization.Xml.Converters
      • DefaultXmlConverter
      • XmlConverter
      • XmlConverterListExtensions
    • Cuemon.Serialization.Xml.Formatters
      • XmlFormatter
      • XmlFormatterOptions
    • Cuemon.Text
      • EncodingConverter
      • EncodingExtensions
      • EncodingOptions
      • EncodingUtility
      • FallbackEncodingOptions
    • Cuemon.Threading
      • AsyncOptions
      • ParallelTasks
      • ThreadPoolUtility
    • Cuemon.Threading.Tasks
      • TaskExtensions
    • Cuemon.Web
      • FieldValueFilter
      • FieldValueSeparator
      • FormConverter
      • FormUtility
      • HeadersConverter
      • HeadersUtility
      • HttpUtility
      • HttpUtilityExtensions
      • QueryStringConverter
      • QueryStringUtility
    • Cuemon.Web.Security
      • WebSecurityUtility
      • WebSecurityUtilityExtensions
    • Cuemon.Xml
      • XmlConvertExtensions
      • XmlCopyOptions
      • XmlDocumentConverter
      • XmlEncodingUtility
      • XmlReaderConverter
      • XmlReaderUtility
      • XmlReaderUtilityExtensions
      • XmlStreamConverter
      • XmlUtility
      • XmlUtilityExtensions
      • XmlWriterUtility
      • XmlWriterUtilityExtensions
    • Cuemon.Xml.Linq
      • XElementExtensions
    • Cuemon.Xml.Serialization
      • SerializableOrder
      • XmlQualifiedEntity
      • XmlWrapper
    • Cuemon.Xml.XPath
      • XPathNavigableConverter

    Class StreamUtility

    This utility class is designed to make System.IO.Stream operations easier to work with.

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

    Methods

    | Improve this Doc

    CombineStreams(Stream[])

    Combines a variable number of streams into one stream.

    Declaration
    public static Stream CombineStreams(params Stream[] streams)
    Parameters
    Type Name Description
    System.IO.Stream[] streams

    The streams to combine.

    Returns
    Type Description
    System.IO.Stream

    A variable number of streams combined into one stream.

    | Improve this Doc

    CopyStream(Stream)

    Creates and returns a seekable copy of the source System.IO.Stream.

    Declaration
    public static Stream CopyStream(Stream source)
    Parameters
    Type Name Description
    System.IO.Stream source

    The source System.IO.Stream to create a copy from.

    Returns
    Type Description
    System.IO.Stream

    A seekable System.IO.Stream that will contain the contents of the source stream.

    | Improve this Doc

    CopyStream(Stream, Boolean)

    Creates and returns a seekable copy of the source System.IO.Stream.

    Declaration
    public static Stream CopyStream(Stream source, bool leaveStreamOpen)
    Parameters
    Type Name Description
    System.IO.Stream source

    The source System.IO.Stream to create a copy from.

    System.Boolean leaveStreamOpen

    if true, the source System.IO.Stream is being left open; otherwise it is being closed and disposed.

    Returns
    Type Description
    System.IO.Stream

    A seekable System.IO.Stream that will contain the contents of the source stream.

    | Improve this Doc

    CopyStream(Stream, Boolean, Int32)

    Creates and returns a seekable copy of the source System.IO.Stream.

    Declaration
    public static Stream CopyStream(Stream source, bool leaveStreamOpen, int bufferSize)
    Parameters
    Type Name Description
    System.IO.Stream source

    The source System.IO.Stream to create a copy from.

    System.Boolean leaveStreamOpen

    if true, the source System.IO.Stream is being left open; otherwise it is being closed and disposed.

    System.Int32 bufferSize

    The size of the buffer. This value must be greater than zero. The default size is 2048.

    Returns
    Type Description
    System.IO.Stream

    A seekable System.IO.Stream that will contain the contents of the source stream.

    | Improve this Doc

    CopyStream(Stream, Stream)

    Reads all the bytes from the source stream and writes them to the destination stream.

    Declaration
    public static void CopyStream(Stream source, Stream destination)
    Parameters
    Type Name Description
    System.IO.Stream source

    The stream to read the contents from.

    System.IO.Stream destination

    The stream that will contain the contents of the source stream.

    | Improve this Doc

    CopyStream(Stream, Stream, Int32)

    Reads all the bytes from the source stream and writes them to the destination stream, using the specified buffer size of bufferSize.

    Declaration
    public static void CopyStream(Stream source, Stream destination, int bufferSize)
    Parameters
    Type Name Description
    System.IO.Stream source

    The stream to read the contents from.

    System.IO.Stream destination

    The stream that will contain the contents of the source stream.

    System.Int32 bufferSize

    The size of the buffer. This value must be greater than zero. The default size is 2048.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CombineStreams(Stream[])
      • CopyStream(Stream)
      • CopyStream(Stream, Boolean)
      • CopyStream(Stream, Boolean, Int32)
      • CopyStream(Stream, Stream)
      • CopyStream(Stream, Stream, Int32)
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX