docs: @Override
    public boolean prefixedDataAvailable(int prefixLength, int maxDataLength) {
      if (remaining() < prefixLength) {
        return false;
      }
  
      int dataLength;
      switch (prefixLength) {
        case 1:
          dataLength = getUnsigned(position());
          break;
        case 2:
          dataLength = getUnsignedShort(position());
          break;
        case 4:
          dataLength = getInt(position());
          break;
        default:
          throw new IllegalArgumentException("prefixLength: " + prefixLength);
      }
  
      if (dataLength < 0 || dataLength > maxDataLength) {
        throw new BufferDataException("dataLength: " + dataLength);
      }
  
      return remaining() - prefixLength >= dataLength;
    }