public static String decomposeInternetUrl(String url, Object [] MV_returnarray) {
    { int fieldStart = 0;
      int fieldEnd = Native.stringSearch(url, Native.makeString(1, ':'), 0);
      String protocol = "";
      String userInformation = "";
      String domainName = "";
      String portNumber = "";
      String path = "";
      String query = "";
      String fragment = "";

      if (fieldEnd != Stella.NULL_INTEGER) {
        protocol = Native.string_subsequence(url, 0, fieldEnd);
        if (fieldEnd == Native.stringSearch(url, "://", fieldEnd)) {
          fieldEnd = fieldEnd + 3;
        }
        else {
          fieldEnd = fieldEnd + 1;
        }
        fieldStart = fieldEnd;
        fieldEnd = Native.string_position(url, '/', fieldStart);
        domainName = Native.string_subsequence(url, fieldStart, fieldEnd);
        fieldStart = fieldEnd;
      }
      fieldEnd = Native.string_position(url, '?', fieldStart);
      if (fieldEnd != Stella.NULL_INTEGER) {
        {
          path = Native.string_subsequence(url, fieldStart, fieldEnd);
          fieldStart = fieldEnd + 1;
          fieldEnd = Native.string_position(url, '#', fieldStart);
          if (fieldEnd != Stella.NULL_INTEGER) {
            {
              query = Native.string_subsequence(url, fieldStart, fieldEnd);
              fieldStart = fieldEnd + 1;
              fragment = Native.string_subsequence(url, fieldStart, Stella.NULL_INTEGER);
            }
          }
          else {
            query = Native.string_subsequence(url, fieldStart, Stella.NULL_INTEGER);
          }
        }
      }
      else {
        {
          fieldEnd = Native.string_position(url, '#', fieldStart);
          if (fieldEnd != Stella.NULL_INTEGER) {
            {
              path = Native.string_subsequence(url, fieldStart, fieldEnd);
              fieldStart = fieldEnd + 1;
              fragment = Native.string_subsequence(url, fieldStart, Stella.NULL_INTEGER);
            }
          }
          else {
            path = Native.string_subsequence(url, fieldStart, Stella.NULL_INTEGER);
          }
        }
      }
      fieldEnd = Native.string_position(domainName, '@', 0);
      if (fieldEnd != Stella.NULL_INTEGER) {
        userInformation = Native.string_subsequence(domainName, 0, fieldEnd);
        domainName = Native.string_subsequence(domainName, fieldEnd + 1, Stella.NULL_INTEGER);
      }
      fieldStart = Native.string_position(domainName, ':', 0);
      if (fieldStart != Stella.NULL_INTEGER) {
        portNumber = Native.string_subsequence(domainName, fieldStart + 1, Stella.NULL_INTEGER);
        domainName = Native.string_subsequence(domainName, 0, fieldStart);
      }
      { String _return_temp = protocol;

        MV_returnarray[0] = StringWrapper.wrapString(userInformation);
        MV_returnarray[1] = StringWrapper.wrapString(domainName);
        MV_returnarray[2] = StringWrapper.wrapString(portNumber);
        MV_returnarray[3] = StringWrapper.wrapString(path);
        MV_returnarray[4] = StringWrapper.wrapString(query);
        MV_returnarray[5] = StringWrapper.wrapString(fragment);
        return (_return_temp);
      }
    }
  }