Skip to content

Commit

Permalink
Make writer.write a fluent builder method
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Apr 15, 2024
1 parent 30f4064 commit 937c8b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class AvroBinaryWriter(

private val encoder = factory.binaryEncoder(output, null)

fun write(record: GenericRecord) {
fun write(record: GenericRecord): AvroBinaryWriter {
datumWriter.write(record, encoder)
return this
}

private fun flush() {
Expand Down

0 comments on commit 937c8b8

Please sign in to comment.