KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > contineo > communication > ContentPart


1 /*
2  * ContentPart.java
3  *
4  * Created on 26. Februar 2004, 20:09
5  */

6
7 package org.contineo.communication;
8
9 /**
10  *
11  * @author Michael Scholz
12  */

13 public class ContentPart {
14     
15     /**
16      * @uml.property name="messageId"
17      */

18     private int messageId;
19     /**
20      * @uml.property name="fileName"
21      */

22     private String JavaDoc fileName;
23     /**
24      * @uml.property name="mimeType"
25      */

26     private String JavaDoc mimeType;
27     /**
28      * @uml.property name="content"
29      */

30     private byte[] content;
31     
32     /** Creates a new instance of ContentPart */
33     public ContentPart() {
34         messageId = 0;
35         mimeType = "";
36         content = null;
37     }
38
39     /**
40      *
41      * @uml.property name="messageId"
42      */

43     public int getMessageId() {
44         return messageId;
45     }
46
47     /**
48      *
49      * @uml.property name="fileName"
50      */

51     public String JavaDoc getFileName() {
52         return fileName;
53     }
54
55     /**
56      *
57      * @uml.property name="mimeType"
58      */

59     public String JavaDoc getMimeType() {
60         return mimeType;
61     }
62
63     /**
64      *
65      * @uml.property name="content"
66      */

67     public byte[] getContent() {
68         return content;
69     }
70
71     /**
72      *
73      * @uml.property name="messageId"
74      */

75     public void setMessageId(int id) {
76         messageId = id;
77     }
78
79     /**
80      *
81      * @uml.property name="fileName"
82      */

83     public void setFileName(String JavaDoc fname) {
84         fileName = fname;
85     }
86
87     /**
88      *
89      * @uml.property name="mimeType"
90      */

91     public void setMimeType(String JavaDoc type) {
92         mimeType = type;
93     }
94
95     /**
96      *
97      * @uml.property name="content"
98      */

99     public void setContent(byte[] cntnt) {
100         content = cntnt;
101     }
102
103     
104     public long getContentSize() {
105         return content.length;
106     }
107 }
Popular Tags