Package javax.mail

Examples of javax.mail.FolderNotFoundException


        return getName();
  }

  public Message getMessage(int messageNumber) throws MessagingException {
        if (!isOpen()) throw new IllegalStateException("Folder is closed.");
        if (!exists()) throw new FolderNotFoundException(this);
        if (ROOT.equals(getName())) {
            throw new MethodNotSupportedException("getMessage");
        }
        synchronized (this) {
            int index = messageNumber - 1;
View Full Code Here


        }
  }

  public int getMessageCount() throws MessagingException {
        if (!isOpen()) return -1;
        if (!exists()) throw new FolderNotFoundException(this);
        if (ROOT.equals(getName())) return 0;
        synchronized (this) {
            return messages.size();
        }
  }
View Full Code Here

        };
  }

  public void open(int mode) throws MessagingException {
        if (isOpen()) throw new IllegalStateException("Folder is open.");
        if (!exists()) throw new FolderNotFoundException(this);
        if (ROOT.equals(getName())) {
            throw new MethodNotSupportedException("open");
        }
        ExchangeStore store = (ExchangeStore) getStore();
        synchronized (this) {
View Full Code Here

    throw new MethodNotSupportedException("renameTo");
  }

    public void register(InputStream stream) throws MessagingException {
        if (!isOpen()) throw new IllegalStateException("Folder is closed.");
        if (!exists()) throw new FolderNotFoundException(this);
        synchronized (this) {
            if (openStreams == null) openStreams = new HashSet<InputStream>();
            openStreams.add(stream);
        }
    }
View Full Code Here

TOP

Related Classes of javax.mail.FolderNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.