Lucene.Net.Store.TestHugeRamFile.DenseRAMFile.NewBuffer C# (CSharp) Метод

NewBuffer() защищенный Метод

protected NewBuffer ( int size ) : byte[]
size int
Результат byte[]
            protected internal override byte[] NewBuffer(int size)
            {
                Capacity += size;
                if (Capacity <= MAX_VALUE)
                {
                    // below maxint we reuse buffers
                    byte[] buf;
                    SingleBuffers.TryGetValue(Convert.ToInt32(size), out buf);
                    if (buf == null)
                    {
                        buf = new byte[size];
                        //System.out.println("allocate: "+size);
                        SingleBuffers[Convert.ToInt32(size)] = buf;
                    }
                    return buf;
                }
                //System.out.println("allocate: "+size); System.out.Flush();
                return new byte[size];
            }
        }
TestHugeRamFile.DenseRAMFile