public abstract class ContentStreamBase extends java.lang.Object implements ContentStream
Modifier and Type | Class and Description |
---|---|
static class |
ContentStreamBase.FileStream
Construct a
ContentStream from a File |
static class |
ContentStreamBase.StringStream
Construct a
ContentStream from a File |
static class |
ContentStreamBase.URLStream
Construct a
ContentStream from a URL
This uses a URLConnection to get the content stream |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
contentType |
static java.lang.String |
DEFAULT_CHARSET |
protected java.lang.String |
name |
protected java.lang.Long |
size |
protected java.lang.String |
sourceInfo |
Constructor and Description |
---|
ContentStreamBase() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getCharsetFromContentType(java.lang.String contentType) |
java.lang.String |
getContentType() |
java.lang.String |
getName() |
java.io.Reader |
getReader()
Base reader implementation.
|
java.lang.Long |
getSize() |
java.lang.String |
getSourceInfo() |
void |
setContentType(java.lang.String contentType) |
void |
setName(java.lang.String name) |
void |
setSize(java.lang.Long size) |
void |
setSourceInfo(java.lang.String sourceInfo) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStream
public static final java.lang.String DEFAULT_CHARSET
protected java.lang.String name
protected java.lang.String sourceInfo
protected java.lang.String contentType
protected java.lang.Long size
public static java.lang.String getCharsetFromContentType(java.lang.String contentType)
public java.io.Reader getReader() throws java.io.IOException
getReader
in interface ContentStream
java.io.IOException
public java.lang.String getContentType()
getContentType
in interface ContentStream
public void setContentType(java.lang.String contentType)
public java.lang.String getName()
getName
in interface ContentStream
public void setName(java.lang.String name)
public java.lang.Long getSize()
getSize
in interface ContentStream
null
if not knownpublic void setSize(java.lang.Long size)
public java.lang.String getSourceInfo()
getSourceInfo
in interface ContentStream
public void setSourceInfo(java.lang.String sourceInfo)