コード例 #1
0
 /// <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));
 }
コード例 #2
0
 /// <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));
 }
コード例 #3
0
 /// <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)));
 }
コード例 #4
0
 /// <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)));
 }
コード例 #5
0
 private Codec ResolveCodec()
 {
     return(Codec.CreateCodecFromString(GetMetaString(DataFileConstants.MetaDataCodec)));
 }