- /*
- * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
- package javax.mail;
-
- /**
- * This exception is thrown when an attempt is made to open a folder
- * read-write access when the folder is marked read-only. <p>
- *
- * The getMessage() method returns more detailed information about the
- * error that caused this exception. <p>
- *
- * @author Jim Glennon
- */
-
- public class ReadOnlyFolderException extends MessagingException {
- transient private Folder folder;
-
- /**
- * Constructs a MessagingException with the specified folder.
- * @param folder the Folder
- * @since JavaMail 1.2
- */
- public ReadOnlyFolderException(Folder folder) {
- this(folder, null);
- }
-
- /**
- * Constructs a MessagingException with the specified folder and
- * the specified detail message.
- * @param folder the Folder
- * @param message the detailed error message
- * @since JavaMail 1.2
- */
- public ReadOnlyFolderException(Folder folder, String message) {
- super(message);
- this.folder = folder;
- }
-
- /**
- * Returns the dead Folder object.
- * @since JavaMail 1.2
- */
- public Folder getFolder() {
- return folder;
- }
- }