1 21 22 27 28 package javax.mail; 29 30 import java.io.*; 31 import java.util.Enumeration ; 32 import javax.activation.DataHandler ; 33 34 84 85 public interface Part { 86 87 100 public int getSize() throws MessagingException ; 101 102 113 public int getLineCount() throws MessagingException ; 114 115 125 public String getContentType() throws MessagingException ; 126 127 141 public boolean isMimeType(String mimeType) throws MessagingException ; 142 143 148 public static final String ATTACHMENT = "attachment"; 149 150 155 public static final String INLINE = "inline"; 156 157 174 public String getDisposition() throws MessagingException ; 175 176 189 public void setDisposition(String disposition) throws MessagingException ; 190 191 199 public String getDescription() throws MessagingException ; 200 201 212 public void setDescription(String description) throws MessagingException ; 213 214 222 public String getFileName() throws MessagingException ; 223 224 236 public void setFileName(String filename) throws MessagingException ; 237 238 254 public InputStream getInputStream() 255 throws IOException, MessagingException ; 256 257 265 public DataHandler getDataHandler() throws MessagingException ; 266 267 286 public Object getContent() throws IOException, MessagingException ; 287 288 299 public void setDataHandler(DataHandler dh) throws MessagingException ; 300 301 318 public void setContent(Object obj, String type) 319 throws MessagingException ; 320 321 332 public void setText(String text) throws MessagingException ; 333 334 345 public void setContent(Multipart mp) throws MessagingException ; 346 347 365 public void writeTo(OutputStream os) throws IOException, MessagingException ; 366 367 376 public String [] getHeader(String header_name) 377 throws MessagingException ; 378 379 392 public void setHeader(String header_name, String header_value) 393 throws MessagingException ; 394 406 public void addHeader(String header_name, String header_value) 407 throws MessagingException ; 408 419 public void removeHeader(String header_name) 420 throws MessagingException ; 421 422 429 public Enumeration getAllHeaders() throws MessagingException ; 430 431 438 public Enumeration getMatchingHeaders(String [] header_names) 439 throws MessagingException ; 440 441 448 public Enumeration getNonMatchingHeaders(String [] header_names) 449 throws MessagingException ; 450 } 451 | Popular Tags |