@Override public Folder getFolder(URLName url) throws MessagingException { checkConnected(); return new POP3Folder(this, url.getFile()); }
public Folder getFolder(URLName url) throws MessagingException { checkConnected(); return new POP3Folder(this, url.getFile()); }
/** * Get named folder. Returns a new, closed IMAPFolder. */ @Override public synchronized Folder getFolder(URLName url) throws MessagingException { checkConnected(); return newIMAPFolder(url.getFile(), IMAPFolder.UNKNOWN_SEPARATOR); }
/** * Get named folder. Returns a new, closed IMAPFolder. */ public synchronized Folder getFolder(URLName url) throws MessagingException { checkConnected(); return newIMAPFolder(url.getFile(), IMAPFolder.UNKNOWN_SEPARATOR); }
/** * Constructs a URL from the URLName. * * @return the URL * @exception MalformedURLException if the URL is malformed */ public URL getURL() throws MalformedURLException { return new URL(getProtocol(), getHost(), getPort(), getFile()); }
String host = name.getHost(); int port = name.getPort(); String file = name.getFile(); String ref = name.getRef(); StringBuilder tempURL = new StringBuilder();
/** * Constructs a URL from the URLName. * * @return the URL * @exception MalformedURLException if the URL is malformed */ public URL getURL() throws MalformedURLException { // URL expects the file to include the separating "/" String f = getFile(); if (f == null) f = ""; else f = "/" + f; return new URL(getProtocol(), getHost(), getPort(), f); }
protected void openFolder() throws MessagingException { if (this.folder == null) { openSession(); connectStoreIfNecessary(); this.folder = obtainFolderInstance(); } else { connectStoreIfNecessary(); } if (this.folder == null || !this.folder.exists()) { throw new IllegalStateException("no such folder [" + this.url.getFile() + "]"); } if (this.folder.isOpen()) { return; } if (this.logger.isDebugEnabled()) { this.logger.debug("opening folder [" + this.folder.getURLName() + "]"); } this.folder.open(this.folderOpenMode); }
/** * Return a URLName representing this service. The returned URLName * does <em>not</em> include the password field. <p> * * Subclasses should only override this method if their * URLName does not follow the standard format. <p> * * The implementation in the Service class returns (usually a copy of) * the <code>url</code> field with the password and file information * stripped out. * * @return the URLName representing this service * @see URLName */ public URLName getURLName() { URLName url = this.url; // snapshot if (url != null && (url.getPassword() != null || url.getFile() != null)) return new URLName(url.getProtocol(), url.getHost(), url.getPort(), null /* no file */, url.getUsername(), null /* no password */); else return url; }
/** * Return a URLName representing this service. The returned URLName * does <em>not</em> include the password field. <p> * * Subclasses should only override this method if their * URLName does not follow the standard format. <p> * * The implementation in the Service class returns (usually a copy of) * the <code>url</code> field with the password and file information * stripped out. * * @return the URLName representing this service * @see URLName */ public URLName getURLName() { URLName url = this.url; // snapshot if (url != null && (url.getPassword() != null || url.getFile() != null)) return new URLName(url.getProtocol(), url.getHost(), url.getPort(), null /* no file */, url.getUsername(), null /* no password */); else return url; }
user = url.getUsername(); password = url.getPassword(); file = url.getFile();
user = url.getUsername(); password = url.getPassword(); file = url.getFile();
file = url.getFile();
file = url.getFile();
@Override public Folder getFolder(final URLName url) throws MessagingException { checkConnected(); return getFolder(url.getFile()); }
@Override public Folder getFolder(URLName url) throws MessagingException { checkConnected(); return new POP3Folder(this, url.getFile()); }
/** * Get named folder. Returns a new, closed IMAPFolder. */ public synchronized Folder getFolder(URLName url) throws MessagingException { checkConnected(); return newIMAPFolder(url.getFile(), IMAPFolder.UNKNOWN_SEPARATOR); }
/** * Get named folder. Returns a new, closed IMAPFolder. */ public synchronized Folder getFolder(URLName url) throws MessagingException { checkConnected(); return new IMAPFolder(url.getFile(), IMAPFolder.UNKNOWN_SEPARATOR, this); }
/** * Constructs a URL from the URLName. */ public URL getURL() throws MalformedURLException { return new URL(getProtocol(), getHost(), getPort(), getFile()); }
protected void setURLName(URLName url) { // host, user, password, and file don't matter so we strip them out if (url != null && (url.getUsername() != null || url.getHost() != null || url.getFile() != null)) url = new URLName(url.getProtocol(), null, -1, null, null, null); super.setURLName(url); }