docs: public void writeLong(long value) throws IOException {
      if (8 > buf.length - pos) {
        //not enough space remaining
        byte[] arr = new byte[8];
        arr[0] = (byte) value;
        arr[1] = (byte) (value >> 8);
        arr[2] = (byte) (value >> 16);
        arr[3] = (byte) (value >> 24);
        arr[4] = (byte) (value >> 32);
        arr[5] = (byte) (value >> 40);
        arr[6] = (byte) (value >> 48);
        arr[7] = (byte) (value >> 56);
        write(arr, 0, 8);
        return;
      }
  
      buf[pos] = (byte) value;
      buf[pos + 1] = (byte) (value >> 8);
      buf[pos + 2] = (byte) (value >> 16);
      buf[pos + 3] = (byte) (value >> 24);
      buf[pos + 4] = (byte) (value >> 32);
      buf[pos + 5] = (byte) (value >> 40);
      buf[pos + 6] = (byte) (value >> 48);
      buf[pos + 7] = (byte) (value >> 56);
      pos += 8;
    }