1 21 22 27 28 package com.sun.mail.dsn; 29 30 import java.io.*; 31 32 import javax.activation.*; 33 import javax.mail.*; 34 import javax.mail.internet.*; 35 36 40 public class MessageHeaders extends MimeMessage { 41 42 45 public MessageHeaders() throws MessagingException { 46 super((Session)null); 47 content = new byte[0]; 48 } 49 50 55 public MessageHeaders(InputStream is) throws MessagingException { 56 super(null, is); 57 content = new byte[0]; 58 } 59 60 65 public MessageHeaders(InternetHeaders headers) throws MessagingException { 66 super((Session)null); 67 this.headers = headers; 68 content = new byte[0]; 69 } 70 71 75 public int getSize() { 76 return 0; 77 } 78 79 public InputStream getInputStream() { 80 return new ByteArrayInputStream(content); 81 } 82 83 protected InputStream getContentStream() { 84 return new ByteArrayInputStream(content); 85 } 86 87 92 public void setDataHandler(DataHandler dh) throws MessagingException { 93 throw new MessagingException("Can't set content for MessageHeaders"); 94 } 95 96 } 97 | Popular Tags |