Class AvroStreamWriter<T>
Writes objects one after another in the binary encoding, with no container, framing or lengths, for AvroStreamReader<T> or any reader that knows the schema. Objects are buffered and written to the stream once BufferSize bytes are buffered, and on Flush() and Dispose(). The asynchronous members do no synchronous I/O.
public sealed class AvroStreamWriter<T> : IDisposable, IAsyncDisposable
Type Parameters
TThe type of the objects.
- Inheritance
-
AvroStreamWriter<T>
- Implements
- Inherited Members
Remarks
Use an object container file instead when the data should carry its schema, be compressed, or be split. Instances are not thread-safe.
Methods
- Dispose()
Writes the buffered objects, flushes the stream and, unless the options say otherwise, disposes it.
- DisposeAsync()
Writes the buffered objects, flushes the stream and, unless the options say otherwise, disposes it, all asynchronously.
- Flush()
Writes the buffered objects and flushes the stream.
- FlushAsync(CancellationToken)
Writes the buffered objects and flushes the stream, asynchronously.
- Write(T)
Appends one object, writing the buffer to the stream once it is full.
- WriteAsync(T, CancellationToken)
Appends one object; once the buffer is full, it is written to the stream asynchronously.