Method OpenAppendGeneric
- Namespace
- AvroSharp.Containers
- Assembly
- AvroSharp.dll
OpenAppendGeneric(Stream, AvroSchema?, AvroFileWriterOptions?, GenericDatumWriterOptions?)
Opens a container file to append generic values to, as OpenAppend<T>(Stream, AvroSchema, AvroWriteAction<T>, AvroFileWriterOptions?) does. Without a schema, the file's own is used.
public static AvroFileWriter<AvroValue> OpenAppendGeneric(Stream stream, AvroSchema? schema = null, AvroFileWriterOptions? options = null, GenericDatumWriterOptions? writerOptions = null)
Parameters
streamStreamThe file: readable, writable and seekable.
schemaAvroSchemaThe schema of the values, or null for the file's; an empty stream needs one.
optionsAvroFileWriterOptionsThe file options, or null for the defaults; see OpenAppend<T>(Stream, AvroSchema, AvroWriteAction<T>, AvroFileWriterOptions?).
writerOptionsGenericDatumWriterOptionsThe generic writer's options, or null for the defaults.
Returns
Exceptions
- ArgumentException
The stream can't be read, written and seeked, the options have metadata, or the stream is empty and no schema is given.
- AvroException
The file's schema or codec is not the writer's.
- AvroDataException
The file's header is malformed.