コード例 #1
0
ファイル: SMBPanel.java プロジェクト: rahnas/pagavcs
  @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;
  }
コード例 #2
0
 // - Initialisation --------------------------------------------------------
 // -------------------------------------------------------------------------
 public BookmarkRoot() throws IOException {
   this(FileURL.getFileURL(BookmarkProtocolProvider.BOOKMARK + "://"));
 }