/// <summary>
 /// Open a new writer instance to write
 /// to an output stream with a specified codec
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="outStream"></param>
 /// <param name="codec"></param>
 /// <returns></returns>
 public static IFileWriter <T> OpenWriter(DatumWriter <T> writer, Stream outStream, Codec codec)
 {
     return(new DataFileWriter <T>(writer).Create(writer.Schema, outStream, codec));
 }
 /// <summary>
 /// Open a new writer instance to write
 /// to an output stream, using a Null codec
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="outStream"></param>
 /// <returns></returns>
 public static IFileWriter <T> OpenWriter(DatumWriter <T> writer, Stream outStream)
 {
     return(OpenWriter(writer, outStream, Codec.CreateCodec(Codec.Type.Null)));
 }
 /// <summary>
 /// Open a new writer instance to write
 /// to a file path with a specified codec
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="path"></param>
 /// <param name="codec"></param>
 /// <returns></returns>
 public static IFileWriter <T> OpenWriter(DatumWriter <T> writer, string path, Codec codec)
 {
     return(OpenWriter(writer, new FileStream(path, FileMode.Create), codec));
 }
 /// <summary>
 /// Open a new writer instance to write
 /// to a file path, using a Null codec
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="path"></param>
 /// <returns></returns>
 public static IFileWriter <T> OpenWriter(DatumWriter <T> writer, string path)
 {
     return(OpenWriter(writer, new FileStream(path, FileMode.Create), Codec.CreateCodec(Codec.Type.Null)));
 }