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
- 继承
注解
Write内部对象的方法对 HttpResponse 对象进行内部调用 HttpWriter 。The Write methods of the intrinsic HttpResponse object make internal calls to an HttpWriter object.
字段
CoreNewLine |
存储用于此 |
属性
Encoding |
获取 Encoding 的 TextWriter 对象。Gets an Encoding object for the TextWriter. |
FormatProvider |
获取控制格式设置的对象。Gets an object that controls formatting. (继承自 TextWriter) |
NewLine |
获取或设置由当前 |
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() |
获取当前实例的 Type。Gets 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() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |
Write(Boolean) |
将 |
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) |
将 |
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) |
通过在对象上调用 |
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) |