/** * Get whether or not to use the PEEK variant of FETCH when * fetching message content. * * @return the peek flag * @since JavaMail 1.3.3 */ public synchronized boolean getPeek() { if (peek == null) return ((IMAPStore)folder.getStore()).getPeek(); else return peek.booleanValue(); }
protected boolean ignoreBodyStructureSize() { return ((IMAPStore)folder.getStore()).ignoreBodyStructureSize(); }
protected boolean ignoreBodyStructureSize() { return ((IMAPStore)folder.getStore()).ignoreBodyStructureSize(); }
protected int getFetchBlockSize() { return ((IMAPStore)folder.getStore()).getFetchBlockSize(); }
/** * Get whether or not to use the PEEK variant of FETCH when * fetching message content. * * @return the peek flag * @since JavaMail 1.3.3 */ public synchronized boolean getPeek() { if (peek == null) return ((IMAPStore)folder.getStore()).getPeek(); else return peek.booleanValue(); }
protected int getFetchBlockSize() { return ((IMAPStore)folder.getStore()).getFetchBlockSize(); }
/** * Return the fully qualified name of the folder, for use in log messages. * Essentially just the getURLName method, but ignoring the * MessagingException that can never happen. */ private static String folderName(Folder folder) { try { return folder.getURLName().toString(); } catch (MessagingException mex) { // can't happen return folder.getStore().toString() + "/" + folder.toString(); } } }
/** * Return the fully qualified name of the folder, for use in log messages. * Essentially just the getURLName method, but ignoring the * MessagingException that can never happen. */ private static String folderName(Folder folder) { try { return folder.getURLName().toString(); } catch (MessagingException mex) { // can't happen return folder.getStore().toString() + "/" + folder.toString(); } } }
URLName storeURL = getStore().getURLName(); String fullname = getFullName(); StringBuilder encodedName = new StringBuilder();
URLName storeURL = getStore().getURLName(); String fullname = getFullName(); StringBuffer encodedName = new StringBuffer();
/** * Rename this folder. */ public synchronized boolean renameTo(final Folder f) throws MessagingException { checkClosed(); // insure that we are closed. checkExists(); if (f.getStore() != store) throw new MessagingException("Can't rename across Stores"); Object ret = doCommandIgnoreFailure(new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { p.rename(fullName, f.getFullName()); return Boolean.TRUE; } }); if (ret == null) return false; exists = false; attributes = null; notifyFolderRenamedListeners(f); return true; }
/** * Rename this folder. */ @Override public synchronized boolean renameTo(final Folder f) throws MessagingException { checkClosed(); // insure that we are closed. checkExists(); if (f.getStore() != store) throw new MessagingException("Can't rename across Stores"); Object ret = doCommandIgnoreFailure(new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { p.rename(fullName, f.getFullName()); return Boolean.TRUE; } }); if (ret == null) return false; exists = false; attributes = null; notifyFolderRenamedListeners(f); return true; }
/** * Constructor initializing folder and message msgnum; intended to be used by implementations of Folder. * * @param folder the folder that contains the message * @param msgnum the message index within the folder */ protected Message(Folder folder, int msgnum) { this.folder = folder; this.msgnum = msgnum; // make sure we copy the session information from the folder. this.session = folder.getStore().getSession(); }
/** * Constructor initializing folder and message msgnum; intended to be used by implementations of Folder. * * @param folder the folder that contains the message * @param msgnum the message index within the folder */ protected Message(Folder folder, int msgnum) { this.folder = folder; this.msgnum = msgnum; // make sure we copy the session information from the folder. this.session = folder.getStore().getSession(); }
if (folder.getStore() == store) { synchronized(messageCacheLock) { try {
if (folder.getStore() == store) { synchronized(messageCacheLock) { try {
if (folder.getStore() != store) // destination is a different store. throw new MessagingException( move ?
if (folder.getStore() != store) // destination is a different store. throw new MessagingException( move ?
public Folder ensureOpenFolder(Folder folder) throws MessagingException { ensureConnectedStore(folder.getStore()); if (!folder.isOpen()) { openFolder(folder); } return folder; }
@Override public synchronized boolean renameTo(final Folder f) throws MessagingException { abortIdle(); checkClosed(); // insure that we are closed. checkExists(); if (f.getStore() != store) { throw new MessagingException("Can't rename across Stores"); } mailboxFolder.renameFolder(f.getName()); notifyFolderRenamedListeners(f); return true; }