public void Write(byte value) { if (length == buffer.Length) return; // byte will be dropped position++; if (position == buffer.Length) position = 0; buffer[position] = value; length++; }