Table of Contents

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

stream Stream

The file: readable, writable and seekable.

schema AvroSchema

The schema of the values, or null for the file's; an empty stream needs one.

options AvroFileWriterOptions

The file options, or null for the defaults; see OpenAppend<T>(Stream, AvroSchema, AvroWriteAction<T>, AvroFileWriterOptions?).

writerOptions GenericDatumWriterOptions

The generic writer's options, or null for the defaults.

Returns

AvroFileWriter<AvroValue>

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.