code: public void setFragment(String fragment) throws URIException {
          if (fragment == null || fragment.length() == 0) {
              _fragment = (fragment == null) ? null : fragment.toCharArray();
              hash = 0;
              return;
          }
          _fragment = encode(fragment, allowed_fragment, getProtocolCharset());
          hash = 0;
      }
docs: Set the fragment.
  
  @param fragment the fragment string.
  @throws URIException If an error occurs.