Class BufferedWriter
A buffered writer for a Stream
Implements
Inherited Members
Namespace: VoltRpc.IO
Assembly: VoltRpc.dll
Syntax
public class BufferedWriter : IDisposable
Constructors
| Edit this page View SourceBufferedWriter(Stream, int)
Creates a new BufferedWriter instance
Declaration
public BufferedWriter(Stream output, int bufferSize = 8000)
Parameters
Type | Name | Description |
---|---|---|
Stream | output | |
int | bufferSize |
Fields
| Edit this page View SourceMaxStringLength
Max length for a string
Declaration
public const int MaxStringLength = 32768
Field Value
Type | Description |
---|---|
int |
OutputStream
Output Stream
Declaration
protected readonly Stream OutputStream
Field Value
Type | Description |
---|---|
Stream |
Properties
| Edit this page View SourceHasDisposed
Has this object been disposed
Declaration
public bool HasDisposed { get; }
Property Value
Type | Description |
---|---|
bool |
Length
The length of the buffer
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
int |
OutputStreamPosition
You may need to override this if your Stream requires it
Declaration
protected virtual long OutputStreamPosition { get; set; }
Property Value
Type | Description |
---|---|
long |
Position
The current position of the buffer
Declaration
public int Position { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceDispose()
Disposes of this BufferedWriter instance
This method SHOULD NOT be used! VoltRpc will dispose of this object when it is done with it!
NOTE: This disposal method will NOT call Dispose() on the underlying OutputStream
Declaration
public void Dispose()
~BufferedWriter()
Destructor for this object
Declaration
protected ~BufferedWriter()
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[], int, int)
Writes an array of bytes
Declaration
public void WriteBytes(byte[] bytesBuffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytesBuffer | |
int | offset | |
int | count |
WriteString(string)
Writes a string
Declaration
public void WriteString(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException |