Use DataFileWriter.appendEncoded to avoid an extra deserialization/serialization step.