1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.portals.graffito.model;
17
18 import java.io.InputStream;
19
20
21
22 /***
23 * CMS content interface.
24 *
25 * @author <a href="mailto:christophe.lombart">Christophe Lombart</a>
26 * @version $Id: Content.java,v 1.1 2004/12/22 21:16:10 christophe Exp $
27 */
28 public interface Content extends Cloneable
29 {
30 /***
31 * @return Returns the content.
32 */
33 public InputStream getContentStream();
34
35
36 /***
37 * @return Returns the content.
38 */
39 public byte[] getContentByte();
40
41 /***
42 * @return Returns the content in the String format
43 */
44 public String getContentAsString();
45
46 /***
47 * @param stream The content to set.
48 */
49 public void setContent(InputStream stream);
50
51
52 /***
53 * @param content The content to set.
54 */
55 public void setContent(byte[] content);
56
57 /***
58 * @return Returns the encoding.
59 */
60 public String getEncoding();
61
62 /***
63 * @param encoding The encoding to set.
64 */
65 public void setEncoding(String encoding);
66
67 /***
68 * Clone the content object
69 * @return the new clone instante created
70 */
71 Object clone();
72 }
73