Exemplo n.º 1
0
  @Override
  FileURL getServerURL() throws MalformedURLException {
    updateValues();
    FileURL url =
        FileURL.getFileURL(
            FileProtocols.SMB
                + "://"
                + lastServer
                + (lastShare.startsWith("/") ? "" : "/")
                + lastShare);

    // Insert the domain (if any) before the username, separated by a semicolon
    String userInfo = lastUsername;
    if (!lastDomain.equals("")) userInfo = lastDomain + ";" + userInfo;

    url.setCredentials(new Credentials(userInfo, lastPassword));

    return url;
  }
 // - Initialisation --------------------------------------------------------
 // -------------------------------------------------------------------------
 public BookmarkRoot() throws IOException {
   this(FileURL.getFileURL(BookmarkProtocolProvider.BOOKMARK + "://"));
 }