code: @Override
    public synchronized void write(final int b) {
      BufferPool.Buffer buff = getBuffer(count, false);
  
      if (buff == null) {
        buff = newBuffer();
      }
  
      if (!buff.putByte(b)) {
        buff = newBuffer();
        if (!buff.putByte(b)) {
          throw new RuntimeException("Logic error in write(b)");
        }
      }
  
      count++;
    }
docs: Writes the specified byte to this byte array output stream.
  
  @param   b   the byte to be written.