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];
}
}