Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 36 package org.columba.ristretto.message; 37 38 import java.io.IOException ; 39 import java.util.logging.Logger ; 40 41 import org.columba.ristretto.io.Source; 42 43 44 50 public class Message { 51 52 53 private static final Logger LOG = Logger.getLogger("org.columba.ristretto.message"); 54 55 56 protected Header header; 57 protected MimeTree mimePartCollection; 58 protected Source source; 59 60 61 64 public Message() { 65 } 66 67 73 public MimePart getMimePart(int i) { 74 return mimePartCollection.get(i); 75 76 } 77 78 83 public int getMimePartCount() { 84 if (mimePartCollection != null) 85 return mimePartCollection.count(); 86 else 87 return 0; 88 } 89 90 93 public MimeTree getMimePartTree() { 94 return mimePartCollection; 95 } 96 97 102 public void setMimePartTree(MimeTree ac) { 103 mimePartCollection = ac; 104 } 105 106 111 public Header getHeader() { 112 return header; 113 } 114 115 120 public void setHeader(Header h) { 121 this.header = h; 122 } 123 124 127 public Source getSource() { 128 return source; 129 } 130 131 136 public void setSource(Source source) { 137 this.source = source; 138 } 139 140 145 public void close() { 146 try { 147 source.deepClose(); 148 } catch (IOException e) { 149 LOG.warning( e.getLocalizedMessage() ); 150 } 151 } 152 153 156 protected void finalize() throws Throwable { 157 super.finalize(); 158 source.deepClose(); 159 } 160 }
| Popular Tags
|