1 package org.apache.slide.projector.value; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 5 6 public class InputStreamValue extends AbstractStreamableValue { 7 private boolean isDocument; 8 private String contentType, characterEncoding; 9 private InputStream stream; 10 private int contentLength; 11 12 public InputStreamValue(InputStream stream, String contentType, String 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 getInputStream() throws IOException { 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 getContentType() { 33 return contentType; 34 } 35 36 public String getCharacterEncoding() { 37 return characterEncoding; 38 } 39 } | Popular Tags |