20 namespace Lucene.Net.Store
27 private const long serialVersionUID = 1L;
29 protected System.Collections.Generic.List<byte[]> buffers =
new System.Collections.Generic.List<byte[]>();
32 internal long sizeInBytes;
35 private long lastModified = (DateTime.UtcNow.Ticks / TimeSpan.TicksPerMillisecond);
44 this.directory = directory;
49 internal virtual long Length
69 internal virtual long LastModified
82 this.lastModified = value;
87 internal byte[] AddBuffer(
int size)
89 byte[] buffer = NewBuffer(size);
96 if (directory != null)
100 directory.internalSizeInBytes += size;
107 public byte[] GetBuffer(
int index)
111 return buffers[index];
115 public int NumBuffers()
119 return buffers.Count;
130 public virtual byte[] NewBuffer(
int size)
132 return new byte[size];
136 public virtual long SizeInBytes