Class BufferedWriter
A buffered writer for a Stream
Implements
Inherited Members
Namespace: VoltRpc.IO
Assembly: VoltRpc.dll
Syntax
public class BufferedWriter : IDisposable
Constructors
| Improve this Doc View SourceBufferedWriter(Stream, Int32)
Creates a new BufferedWriter instance
Declaration
public BufferedWriter(Stream output, int bufferSize = 8000)
Parameters
Type | Name | Description |
---|---|---|
Stream | output | |
Int32 | bufferSize |
Fields
| Improve this Doc View SourceMaxStringLength
Max length for a String
Declaration
public const int MaxStringLength = 32768
Field Value
Type | Description |
---|---|
Int32 |
OutputStream
Output Stream
Declaration
protected readonly Stream OutputStream
Field Value
Type | Description |
---|---|
Stream |
Properties
| Improve this Doc View SourceLength
The length of the buffer
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
Int32 |
OutputStreamPosition
You may need to override this if your Stream requires it
Declaration
protected virtual long OutputStreamPosition { get; set; }
Property Value
Type | Description |
---|---|
Int64 |
Position
The current position of the buffer
Declaration
public int Position { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()
Flush()
Writes the buffer to the out Stream
Declaration
public void Flush()
Reset()
Reset position
Declaration
public void Reset()
WriteByte(Byte)
Writes a Byte
Declaration
public void WriteByte(byte value)
Parameters
Type | Name | Description |
---|---|---|
Byte | value | The value to write |
WriteBytes(Byte[], Int32, Int32)
Writes an array of Bytes
Declaration
public void WriteBytes(byte[] bytesBuffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytesBuffer | |
Int32 | offset | |
Int32 | count |
WriteString(String)
Writes a String
Declaration
public void WriteString(string value)
Parameters
Type | Name | Description |
---|---|---|
String | value |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException |