Map() private method

Maps a file into a set of buffers
private Map ( MMapIndexInput input, FileStream fc, long offset, long length ) : System.ByteBuffer[]
input MMapIndexInput
fc System.IO.FileStream
offset long
length long
return System.ByteBuffer[]
Beispiel #1
0
 internal MMapIndexInput(MMapDirectory outerInstance, string resourceDescription, FileStream fc)
     : base(resourceDescription, null, fc.Length, outerInstance.chunkSizePower, true)
 {
     this.outerInstance = outerInstance;
     this.fc            = fc ?? throw new ArgumentNullException("fc");
     this.SetBuffers(outerInstance.Map(this, fc, 0, fc.Length));
 }
Beispiel #2
0
 internal MMapIndexInput(MMapDirectory outerInstance, string resourceDescription, FileStream fc)
     : base(resourceDescription, null, fc.Length, outerInstance.chunkSizePower, outerInstance.UseUnmap)
 {
     this.outerInstance = outerInstance;
     this.useUnmapHack  = outerInstance.UseUnmap;
     this.SetBuffers(outerInstance.Map(this, fc, 0, fc.Length));
 }
Beispiel #3
0
            internal MMapIndexInput(MMapDirectory outerInstance, string resourceDescription, FileStream fc)
                : base(resourceDescription, null, fc.Length, outerInstance.ChunkSizePower, outerInstance.UseUnmap)
            {
                this.outerInstance = outerInstance;
                this.UseUnmapHack  = outerInstance.UseUnmap;
                this.Buffers       = outerInstance.Map(this, fc, 0, fc.Length);

                //Called here to let buffers get set up
                base.Seek(0L);
            }
Beispiel #4
0
            internal MMapIndexInput(MMapDirectory outerInstance, string resourceDescription, FileStream fc)
                : base(resourceDescription, null, fc.Length, outerInstance.ChunkSizePower, outerInstance.UseUnmap)
            {
                this.outerInstance = outerInstance;
                this.UseUnmapHack = outerInstance.UseUnmap;
                this.Buffers = outerInstance.Map(this, fc, 0, fc.Length);

                //Called here to let buffers get set up
                base.Seek(0L);
            }
Beispiel #5
0
 internal MMapIndexInput(MMapDirectory outerInstance, string resourceDescription, FileStream fc)
     : base(resourceDescription, null, fc.Length, outerInstance.chunkSizePower, true)
 {
     this.fc = fc ?? throw new ArgumentNullException(nameof(fc)); // LUCENENET specific - changed from IllegalArgumentException to ArgumentNullException (.NET convention)
     this.SetBuffers(outerInstance.Map(this, fc, 0, fc.Length));
 }