public virtual void write(byte b)
{
if (_count >= _size)
{
// System.err.println("Expanding buffer from " + size + " to " + size + defaultIncrement);
byte[] tmp = new byte[_size + defaultIncrement];
Array.Copy(buf, 0, tmp, 0, _count);
_size += defaultIncrement;
buf = tmp;
}
buf[_count++] = b;
}