1 22 23 package gnu.mail.providers; 24 25 import java.io.InputStream ; 26 import javax.mail.Flags ; 27 import javax.mail.Folder ; 28 import javax.mail.IllegalWriteException ; 29 import javax.mail.Message ; 30 import javax.mail.MessagingException ; 31 import javax.mail.Multipart ; 32 import javax.mail.internet.InternetHeaders ; 33 import javax.mail.internet.MimeMessage ; 34 35 43 public abstract class ReadOnlyMessage extends MimeMessage 44 { 45 46 protected ReadOnlyMessage(Folder folder, int msgnum) 47 throws MessagingException 48 { 49 super(folder, msgnum); 50 } 51 52 protected ReadOnlyMessage(Folder folder, InputStream in, int msgnum) 53 throws MessagingException 54 { 55 super(folder, in, msgnum); 56 } 57 58 protected ReadOnlyMessage(Folder folder, InternetHeaders headers, 59 byte[] content, int msgnum) 60 throws MessagingException 61 { 62 super(folder, msgnum); 63 } 64 65 67 public void setContent(Object o, String type) 68 throws MessagingException 69 { 70 throw new IllegalWriteException (); 71 } 72 73 public void setContent(Multipart mp) 74 throws MessagingException 75 { 76 throw new IllegalWriteException (); 77 } 78 79 81 public void setHeader(String name, String value) 82 throws MessagingException 83 { 84 throw new IllegalWriteException (); 85 } 86 87 public void addHeader(String name, String value) 88 throws MessagingException 89 { 90 throw new IllegalWriteException (); 91 } 92 93 public void removeHeader(String name) 94 throws MessagingException 95 { 96 throw new IllegalWriteException (); 97 } 98 99 public void addHeaderLine(String line) 100 throws MessagingException 101 { 102 throw new IllegalWriteException (); 103 } 104 105 107 public void setFlags(Flags flag, boolean set) 108 throws MessagingException 109 { 110 throw new IllegalWriteException (); 111 } 112 113 115 public void saveChanges() 116 throws MessagingException 117 { 118 } 119 120 } 121 | Popular Tags |