KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > projector > value > InputStreamValue


1 package org.apache.slide.projector.value;
2
3 import java.io.IOException JavaDoc;
4 import java.io.InputStream JavaDoc;
5
6 public class InputStreamValue extends AbstractStreamableValue {
7     private boolean isDocument;
8     private String JavaDoc contentType, characterEncoding;
9     private InputStream JavaDoc stream;
10     private int contentLength;
11
12     public InputStreamValue(InputStream JavaDoc stream, String JavaDoc contentType, String JavaDoc characterEncoding, int contentLength, boolean document) {
13         isDocument = document;
14         this.stream = stream;
15         this.contentType = contentType;
16         this.characterEncoding = characterEncoding;
17         this.contentLength = contentLength;
18     }
19
20     public InputStream JavaDoc getInputStream() throws IOException JavaDoc {
21         return stream;
22     }
23
24     public boolean isDocument() {
25         return isDocument;
26     }
27
28     public int getContentLength() {
29         return contentLength;
30     }
31
32     public String JavaDoc getContentType() {
33         return contentType;
34     }
35
36     public String JavaDoc getCharacterEncoding() {
37         return characterEncoding;
38     }
39 }
Popular Tags