public AvroRandomAccessWriter(IAvroFileValueDef <V> valueDef, string fileName, Codec.Type codec, FileShare share = FileShare.None) : base(valueDef, new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite, share), codec) { Index = new AvroRandomAccessIndex <V>(IndexFileName); }
public AvroRandomAccessWriter(IAvroFileValueDef <V> valueDef, string fileName, AvroRandomAccessIndex <V> index = null, FileShare share = FileShare.None) : base(valueDef, new FileStream(fileName, FileMode.Open, FileAccess.ReadWrite, share)) { Index = index ?? new AvroRandomAccessIndex <V>(IndexFileName); if (index == null) { if (File.Exists(IndexFileName)) { Index.Read(); } else { BuildIndex(); } } }
public AvroRandomAccessWriter(IAvroFileValueDef <V> valueDef, FileStream stream, Codec.Type codec) : base(valueDef, stream, codec) { Preconditions.CheckArgument(Stream.CanSeek); Index = new AvroRandomAccessIndex <V>(IndexFileName); }
public AvroRandomAccessWriter(IAvroFileValueDef <V> valueDef, FileStream stream, AvroRandomAccessIndex <V> index) : base(valueDef, stream) { Preconditions.CheckArgument(Stream.CanSeek); Index = index ?? new AvroRandomAccessIndex <V>(IndexFileName); if (index == null) { if (File.Exists(IndexFileName)) { Index.Read(); } else { BuildIndex(); } } }
public AvroRandomAccessReader(IAvroFileValueDef <V> valueDef, FileStream stream, AvroRandomAccessIndex <V> index = null) : base(valueDef, stream) { Preconditions.CheckArgument(Stream.CanSeek); Index = index ?? new AvroRandomAccessIndex <V>(IndexFileName); if (index == null) { Preconditions.CheckState(File.Exists(IndexFileName), "Random access index is not available"); Index.Read(); } }
public AvroRandomAccessReader(IAvroFileValueDef <V> valueDef, string fileName, AvroRandomAccessIndex <V> index = null, FileShare share = FileShare.None) : this(valueDef, new FileStream(fileName, FileMode.Open, FileAccess.Read, share), index) { }
public static DocumentAvroRAWriter OpenFile(string fileName, AvroRandomAccessIndex <Document> index = null, FileShare share = FileShare.None) { return(new DocumentAvroRAWriter(fileName, index, share)); }
public static DocumentAvroRAWriter OpenFile(FileStream stream, AvroRandomAccessIndex <Document> index = null) { return(new DocumentAvroRAWriter(stream, index)); }
public DocumentAvroRAWriter(string fileName, AvroRandomAccessIndex <Document> index = null, FileShare share = FileShare.None) : base(DocAvroFileValueDef.Instance, fileName, index, share) { }
protected DocumentAvroRAWriter(FileStream stream, AvroRandomAccessIndex <Document> index = null) : base(DocAvroFileValueDef.Instance, stream, index) { }
public DocumentAvroRAReader(FileStream stream, AvroRandomAccessIndex <Document> index = null) : base(DocAvroFileValueDef.Instance, stream, index) { }