docs: public synchronized int put(byte[] src, int off, int len) {
          if (available == capacity) {
              return 0;
          }
  
          // limit is last index to put + 1
          int limit = idxPut < idxGet ? idxGet : capacity;
          int count = Math.min(limit - idxPut, len);
          System.arraycopy(src, off, buffer, idxPut, count);
          idxPut += count;
  
          if (idxPut == capacity) {
              // Array end reached, check if we have more
              int count2 = Math.min(len - count, idxGet);
              if (count2 > 0) {
                  System.arraycopy(src, off + count, buffer, 0, count2);
                  idxPut = count2;
                  count += count2;
              } else {
                  idxPut = 0;
              }
          }
          available += count;
          return count;
      }