HttpWriter 类

定义

提供通过内部 TextWriter 对象访问的 HttpResponse 对象。Provides a TextWriter object that is accessed through the intrinsic HttpResponse object.

public ref class HttpWriter sealed : System::IO::TextWriter
public sealed class HttpWriter : System.IO.TextWriter
type HttpWriter = class
    inherit TextWriter
Public NotInheritable Class HttpWriter
Inherits TextWriter
继承

注解

HttpWriter内部Write 对象HttpResponse的方法对对象进行内部调用。The Write methods of the intrinsic HttpResponse object make internal calls to an HttpWriter object.

字段

CoreNewLine

存储用于此 TextWriter 的换行符。Stores the newline characters used for this TextWriter.

(继承自 TextWriter)

属性

Encoding

获取 EncodingTextWriter 对象。Gets an Encoding object for the TextWriter.

FormatProvider

获取控制格式设置的对象。Gets an object that controls formatting.

(继承自 TextWriter)
NewLine

获取或设置由当前 TextWriter 使用的行结束符字符串。Gets or sets the line terminator string used by the current TextWriter.

(继承自 TextWriter)
OutputStream

获取直接从 Stream 启用 HTTP 输出的 Stream 对象。Gets a Stream object to enable HTTP output directly from the Stream.

方法

Close()

将所有缓冲处理的输出发送到 HTTP 输出流并关闭套接字连接。Sends all buffered output to the HTTP output stream and closes the socket connection.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Dispose()

释放由 TextWriter 对象使用的所有资源。Releases all resources used by the TextWriter object.

(继承自 TextWriter)
Dispose(Boolean)

释放由 TextWriter 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the TextWriter and optionally releases the managed resources.

(继承自 TextWriter)
DisposeAsync()

异步释放由 TextWriter 对象使用的所有资源。Asynchronously releases all resources used by the TextWriter object.

(继承自 TextWriter)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Flush()

将所有缓冲处理的输出发送到 HTTP 输出流。Sends all buffered output to the HTTP output stream.

FlushAsync()

异步清理当前编写器的所有缓冲区,使所有缓冲数据写入基础设备。Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

(继承自 TextWriter)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
Write(Boolean)

Boolean 值的文本表示形式写入文本流。Writes the text representation of a Boolean value to the text stream.

(继承自 TextWriter)
Write(Char)

将单个字符发送到 HTTP 输出流。Sends a single character to the HTTP output stream.

Write(Char[])

将字符数组写入文本流。Writes a character array to the text stream.

(继承自 TextWriter)
Write(Char[], Int32, Int32)

将具有指定起始位置和字符数的字符流发送到 HTTP 输出流。Sends a stream of characters with the specified starting position and number of characters to the HTTP output stream.

Write(Decimal)

将小数值的文本表示形式写入文本流。Writes the text representation of a decimal value to the text stream.

(继承自 TextWriter)
Write(Double)

将 8 字节浮点值的文本表示形式写入文本流。Writes the text representation of an 8-byte floating-point value to the text stream.

(继承自 TextWriter)
Write(Int32)

将 4 字节带符号整数的文本表示形式写入文本流。Writes the text representation of a 4-byte signed integer to the text stream.

(继承自 TextWriter)
Write(Int64)

将 8 字节带符号整数的文本表示形式写入文本流。Writes the text representation of an 8-byte signed integer to the text stream.

(继承自 TextWriter)
Write(Object)

Object 发送到 HTTP 输出流。Sends an Object to the HTTP output stream.

Write(ReadOnlySpan<Char>)

将字符范围写入文本流。Writes a character span to the text stream.

(继承自 TextWriter)
Write(Single)

将 4 字节浮点值的文本表示形式写入文本流。Writes the text representation of a 4-byte floating-point value to the text stream.

(继承自 TextWriter)
Write(String)

将一个字符串发送到 HTTP 输出流。Sends a string to the HTTP output stream.

Write(String, Object)

使用与 Format(String, Object) 方法相同的语义将格式化字符串写入文本流。Writes a formatted string to the text stream, using the same semantics as the Format(String, Object) method.

(继承自 TextWriter)
Write(String, Object, Object)

使用与 Format(String, Object, Object) 方法相同的语义将格式化字符串写入文本流。Writes a formatted string to the text stream using the same semantics as the Format(String, Object, Object) method.

(继承自 TextWriter)
Write(String, Object, Object, Object)

使用与 Format(String, Object, Object, Object) 方法相同的语义将格式化字符串写入文本流。Writes a formatted string to the text stream, using the same semantics as the Format(String, Object, Object, Object) method.

(继承自 TextWriter)
Write(String, Object[])

使用与 Format(String, Object[]) 方法相同的语义将格式化字符串写入文本流。Writes a formatted string to the text stream, using the same semantics as the Format(String, Object[]) method.

(继承自 TextWriter)
Write(StringBuilder)

将字符串生成器写入文本流。Writes a string builder to the text stream.

(继承自 TextWriter)
Write(UInt32)

将 4 字节无符号整数的文本表示形式写入文本流。Writes the text representation of a 4-byte unsigned integer to the text stream.

(继承自 TextWriter)
Write(UInt64)

将 8 字节无符号整数的文本表示形式写入文本流。Writes the text representation of an 8-byte unsigned integer to the text stream.

(继承自 TextWriter)
WriteAsync(Char)

将字符异步写入文本流。Writes a character to the text stream asynchronously.

(继承自 TextWriter)
WriteAsync(Char[])

将字符数组异步写入文本流。Writes a character array to the text stream asynchronously.

(继承自 TextWriter)
WriteAsync(Char[], Int32, Int32)

以异步形式将字符的子数组写入文本流。Writes a subarray of characters to the text stream asynchronously.

(继承自 TextWriter)
WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

以异步形式将字符内存区域写入文本流。Asynchronously writes a character memory region to the text stream.

(继承自 TextWriter)
WriteAsync(String)

将字符串异步写入文本流。Writes a string to the text stream asynchronously.

(继承自 TextWriter)
WriteAsync(StringBuilder, CancellationToken)

以异步形式将字符串生成器写入文本流。Asynchronously writes a string builder to the text stream.

(继承自 TextWriter)
WriteBytes(Byte[], Int32, Int32)

将具有指定起始位置和字节数的字节流发送到 HTTP 输出流。Sends a stream of bytes with the specified starting position and number of bytes to the HTTP output stream.

WriteLine()

将回车+换行 (CRLF) 字符对发送到 HTTP 输出流。Sends a carriage return + line feed (CRLF) pair of characters to the HTTP output stream.

WriteLine(Boolean)

Boolean 值的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a Boolean value to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Char)

将字符写入文本流,后跟行终止符。Writes a character to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Char[])

将字符数组写入文本流,后跟行终止符。Writes an array of characters to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Char[], Int32, Int32)

将字符子数组写入文本流,后跟行终止符。Writes a subarray of characters to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Decimal)

将小数值的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a decimal value to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Double)

将 8 字节浮点值的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a 8-byte floating-point value to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Int32)

将 4 字节带符号整数的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a 4-byte signed integer to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Int64)

将 8 字节带符号整数的文本表示形式写入文本流,后跟行终止符。Writes the text representation of an 8-byte signed integer to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Object)

通过在对象上调用 ToString 方法将此对象的文本表示形式写入文本流,后跟行终止符。Writes the text representation of an object to the text stream, by calling the ToString method on that object, followed by a line terminator.

(继承自 TextWriter)
WriteLine(ReadOnlySpan<Char>)

将字符范围的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a character span to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(Single)

将 4 字节浮点值的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a 4-byte floating-point value to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(String)

将字符串写入文本流,后跟行终止符。Writes a string to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(String, Object)

使用与 Format(String, Object) 方法相同的语义将格式化字符串和新行写入文本流。Writes a formatted string and a new line to the text stream, using the same semantics as the Format(String, Object) method.

(继承自 TextWriter)
WriteLine(String, Object, Object)

使用与 Format(String, Object, Object) 方法相同的语义将格式化字符串和新行写入文本流。Writes a formatted string and a new line to the text stream, using the same semantics as the Format(String, Object, Object) method.

(继承自 TextWriter)
WriteLine(String, Object, Object, Object)

使用与 Format(String, Object) 相同的语义将格式化字符串和新行写入文本流。Writes out a formatted string and a new line to the text stream, using the same semantics as Format(String, Object).

(继承自 TextWriter)
WriteLine(String, Object[])

使用与 Format(String, Object) 相同的语义将格式化字符串和新行写入文本流。Writes out a formatted string and a new line to the text stream, using the same semantics as Format(String, Object).

(继承自 TextWriter)
WriteLine(StringBuilder)

将字符串生成器的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a string builder to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(UInt32)

将 4 字节无符号整数的文本表示形式写入文本流,后跟行终止符。Writes the text representation of a 4-byte unsigned integer to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLine(UInt64)

将 8 字节无符号整数的文本表示形式写入文本流,后跟行终止符。Writes the text representation of an 8-byte unsigned integer to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLineAsync()

以异步形式将行终止符写入文本流。Asynchronously writes a line terminator to the text stream.

(继承自 TextWriter)
WriteLineAsync(Char)

以异步形式将字符写入文本流,后跟行终止符。Asynchronously writes a character to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLineAsync(Char[])

以异步形式将字符数组写入文本流,后跟行终止符。Asynchronously writes an array of characters to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLineAsync(Char[], Int32, Int32)

以异步形式将字符子数组写入文本流,后跟行终止符。Asynchronously writes a subarray of characters to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

以异步形式将字符内存区域的文本表示形式写入文本流,后跟行终止符。Asynchronously writes the text representation of a character memory region to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLineAsync(String)

以异步形式将字符串写入文本流,后跟行终止符。Asynchronously writes a string to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteLineAsync(StringBuilder, CancellationToken)

以异步形式将字符串生成器的文本表示形式写入文本流,后跟行终止符。Asynchronously writes the text representation of a string builder to the text stream, followed by a line terminator.

(继承自 TextWriter)
WriteString(String, Int32, Int32)

将具有指定起始位置和字符数的字符串发送到 HTTP 输出流。Sends a string with the specified starting position and number of characters to the HTTP output stream.

显式接口实现

IDisposable.Dispose()

有关此成员的说明,请参见 Dispose()For a description of this member, see Dispose().

(继承自 TextWriter)

适用于

另请参阅