Example usage for javax.mail MethodNotSupportedException MethodNotSupportedException

List of usage examples for javax.mail MethodNotSupportedException MethodNotSupportedException

Introduction

In this page you can find the example usage for javax.mail MethodNotSupportedException MethodNotSupportedException.

Prototype

public MethodNotSupportedException(String s) 

Source Link

Document

Constructs a MethodNotSupportedException with the specified detail message.

Usage

From source file:com.sun.mail.pop3.POP3Folder.java

/**
 * Always throws <code>MethodNotSupportedException</code>
 * because the POP3 protocol doesn't allow the INBOX to
 * be deleted./*  w w  w .ja v  a  2  s  .c  o  m*/
 *
 * @exception   MethodNotSupportedException   always
 */
public boolean delete(boolean recurse) throws MessagingException {
    throw new MethodNotSupportedException("delete");
}

From source file:com.sun.mail.pop3.POP3Folder.java

/**
 * Always throws <code>MethodNotSupportedException</code>
 * because the POP3 protocol doesn't support multiple folders.
 *
 * @exception   MethodNotSupportedException   always
 *///w  w w.  j a va  2s . com
public boolean renameTo(Folder f) throws MessagingException {
    throw new MethodNotSupportedException("renameTo");
}

From source file:com.sun.mail.pop3.POP3Folder.java

/**
 * Always throws <code>MethodNotSupportedException</code>
 * because the POP3 protocol doesn't support appending messages.
 *
 * @exception   MethodNotSupportedException   always
 *///from   w w w.  ja  v a 2s.c o m
public void appendMessages(Message[] msgs) throws MessagingException {
    throw new MethodNotSupportedException("Append not supported");
}

From source file:com.sun.mail.pop3.POP3Folder.java

/**
 * Always throws <code>MethodNotSupportedException</code>
 * because the POP3 protocol doesn't support expunging messages
 * without closing the folder; call the {@link #close close} method
 * with the <code>expunge</code> argument set to <code>true</code>
 * instead.//from  w  w  w .j  a  v a 2 s .com
 *
 * @exception   MethodNotSupportedException   always
 */
public Message[] expunge() throws MessagingException {
    throw new MethodNotSupportedException("Expunge not supported");
}