Click or drag to resize

StreamWriter Class

Implements a CrestronIO.TextWriter for writing characters to a stream in a particular encoding.
Inheritance Hierarchy
SystemObject
  Crestron.SimplSharp.CrestronIOTextWriter
    Crestron.SimplSharp.CrestronIOStreamWriter

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public class StreamWriter : TextWriter

The StreamWriter type exposes the following members.

Constructors
 NameDescription
Public methodStreamWriter(Stream) Initializes a new instance of the CrestronIO.StreamWriter class for the specified stream, using UTF-8 encoding and the default buffer size.
Public methodStreamWriter(String) Initializes a new instance of the CrestronIO.StreamWriter class for the specified file on the specified path, using the default encoding and buffer size.
Public methodStreamWriter(Stream, Encoding) Initializes a new instance of the CrestronIO.StreamWriter class for the specified stream, using the specified encoding and the default buffer size.
Public methodStreamWriter(String, Boolean) Initializes a new instance of the CrestronIO.StreamWriter class for the specified file on the specified path, using the default encoding and buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file.
Public methodStreamWriter(Stream, Encoding, Int32) Initializes a new instance of the CrestronIO.StreamWriter class for the specified stream, using the specified encoding and buffer size.
Public methodStreamWriter(String, Boolean, Encoding) Initializes a new instance of the CrestronIO.StreamWriter class for the specified file on the specified path, using the specified encoding and default buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file.
Public methodStreamWriter(String, Boolean, Encoding, Int32) Initializes a new instance of the CrestronIO.StreamWriter class for the specified file on the specified path, using the specified encoding and buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file.
Top
Properties
 NameDescription
Public propertyAutoFlush Gets or sets a value indicating whether the CrestronIO.StreamWriter will flush its buffer to the underlying stream after every call to CrestronIO.StreamWriter.Write(System.Char).
Public propertyBaseStream Gets the underlying stream that interfaces with a backing store.
Public propertyEncoding Gets the System.Text.Encoding in which the output is written.
(Overrides TextWriterEncoding)
Public propertyFormatProvider Gets an object that controls formatting.
(Inherited from TextWriter)
Public propertyNewLine Gets or sets the line terminator string used by the current TextWriter.
(Overrides TextWriterNewLine)
Top
Methods
 NameDescription
Public methodClose Closes the current writer and releases any system resources associated with the writer.
(Inherited from TextWriter)
Public methodDispose Releases all resources used by the CrestronIO.TextWriter object.
(Inherited from TextWriter)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the CrestronIO.StreamWriter and optionally releases the managed resources.
(Overrides TextWriterDispose(Boolean))
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Destructor for StreamWriter.
(Overrides ObjectFinalize)
Public methodFlush Clears all buffers for the current writer and causes any buffered data to be written to the underlying stream.
(Overrides TextWriterFlush)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWrite(Boolean) Writes the text representation of a Boolean value to the text stream.
(Overrides TextWriterWrite(Boolean))
Public methodWrite(Char) Writes a character to the text stream.
(Overrides TextWriterWrite(Char))
Public methodWrite(Char) Writes a character array to the text stream.
(Overrides TextWriterWrite(Char))
Public methodWrite(Decimal) Writes the text representation of a decimal value to the text stream.
(Overrides TextWriterWrite(Decimal))
Public methodWrite(Double) Writes the text representation of an 8-byte floating-point value to the text stream.
(Overrides TextWriterWrite(Double))
Public methodWrite(Int32) Writes the text representation of a 4-byte signed integer to the text stream.
(Overrides TextWriterWrite(Int32))
Public methodWrite(Int64) Writes the text representation of an 8-byte signed integer to the text stream.
(Overrides TextWriterWrite(Int64))
Public methodWrite(Object) Writes the text representation of an object to the text stream by calling ToString on that object.
(Overrides TextWriterWrite(Object))
Public methodWrite(Single) Writes the text representation of a 4-byte floating-point value to the text stream.
(Overrides TextWriterWrite(Single))
Public methodWrite(String) Writes a string to the text stream.
(Overrides TextWriterWrite(String))
Public methodWrite(UInt32) Writes the text representation of a 4-byte unsigned integer to the text stream.
(Overrides TextWriterWrite(UInt32))
Public methodWrite(UInt64) Writes the text representation of an 8-byte unsigned integer to the text stream.
(Overrides TextWriterWrite(UInt64))
Public methodWrite(String, Object) Writes out a formatted string, using the same semantics as System.String.Format(System.String,System.Object).
(Overrides TextWriterWrite(String, Object))
Public methodWrite(String, Object) Writes out a formatted string, using the same semantics as System.String.Format(System.String,System.Object).
(Overrides TextWriterWrite(String, Object))
Public methodWrite(Char, Int32, Int32) Writes a subarray of characters to the text stream.
(Overrides TextWriterWrite(Char, Int32, Int32))
Public methodWrite(String, Object, Object) Writes out a formatted string, using the same semantics as System.String.Format(System.String,System.Object).
(Overrides TextWriterWrite(String, Object, Object))
Public methodWriteLine Writes a line terminator to the text stream.
(Overrides TextWriterWriteLine)
Public methodWriteLine(Boolean) Writes the text representation of a Boolean followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Boolean))
Public methodWriteLine(Char) Writes a character followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Char))
Public methodWriteLine(Char) Writes an array of characters followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Char))
Public methodWriteLine(Decimal) Writes the text representation of a decimal value followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Decimal))
Public methodWriteLine(Double) Writes the text representation of a 8-byte floating-point value followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Double))
Public methodWriteLine(Int32) Writes the text representation of a 4-byte signed integer followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Int32))
Public methodWriteLine(Int64) Writes the text representation of an 8-byte signed integer followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Int64))
Public methodWriteLine(Object) Writes the text representation of an object by calling ToString on this object, followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Object))
Public methodWriteLine(Single) Writes the text representation of a 4-byte floating-point value followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Single))
Public methodWriteLine(String) Writes a string followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(String))
Public methodWriteLine(UInt32) Writes the text representation of a 4-byte unsigned integer followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(UInt32))
Public methodWriteLine(UInt64) Writes the text representation of an 8-byte unsigned integer followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(UInt64))
Public methodWriteLine(String, Object) Writes out a formatted string and a new line, using the same semantics as System.String.Format(System.String,System.Object).
(Overrides TextWriterWriteLine(String, Object))
Public methodWriteLine(String, Object) Writes out a formatted string and a new line, using the same semantics as System.String.Format(System.String,System.Object).
(Overrides TextWriterWriteLine(String, Object))
Public methodWriteLine(Char, Int32, Int32) Writes a subarray of characters followed by a line terminator to the text stream.
(Overrides TextWriterWriteLine(Char, Int32, Int32))
Public methodWriteLine(String, Object, Object) Writes out a formatted string and a new line, using the same semantics as System.String.Format(System.String,System.Object).
(Overrides TextWriterWriteLine(String, Object, Object))
Top
Fields
 NameDescription
Protected fieldCoreNewLine Stores the new line characters used for this TextWriter.
(Inherited from TextWriter)
Public fieldStatic memberNull Provides a StreamWriter with no backing store that can be written to, but not read from.
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also