public class ContentStreamImpl extends AbstractExtensionData implements MutableContentStream
| Constructor and Description |
|---|
ContentStreamImpl()
Constructor.
|
ContentStreamImpl(String filename,
BigInteger length,
String mimetype,
InputStream stream)
Constructor.
|
ContentStreamImpl(String filename,
String mimetype,
String string)
Convenience constructor for tests.
|
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
getBigLength()
Returns the length of the stream.
|
String |
getFileName()
Returns the file name of the stream.
|
long |
getLength()
Returns the length of the stream.
|
String |
getMimeType()
Returns the MIME type of the stream.
|
InputStream |
getStream()
Returns the stream.
|
void |
setFileName(String filename)
Sets the file name.
|
void |
setLength(BigInteger length)
Sets the length of the stream.
|
void |
setMimeType(String mimeType)
Sets the MIME type of the stream.
|
void |
setStream(InputStream stream)
Sets the stream.
|
String |
toString() |
getExtensions, setExtensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExtensions, setExtensionspublic ContentStreamImpl()
public ContentStreamImpl(String filename, BigInteger length, String mimetype, InputStream stream)
public String getFileName()
ContentStreamgetFileName in interface ContentStreamnull if the file name is
unknownpublic void setFileName(String filename)
MutableContentStreamsetFileName in interface MutableContentStreamfilename - the file namepublic long getLength()
ContentStreamgetLength in interface ContentStreampublic BigInteger getBigLength()
ContentStreamgetBigLength in interface ContentStreamnull if the length
is unknownpublic void setLength(BigInteger length)
MutableContentStreamsetLength in interface MutableContentStreamlength - the length of the stream in bytes or null if the
length is unknownpublic String getMimeType()
ContentStreamgetMimeType in interface ContentStreamnull if the MIME type is
unknownpublic void setMimeType(String mimeType)
MutableContentStreamsetMimeType in interface MutableContentStreammimeType - the MIME typepublic InputStream getStream()
ContentStreamIt is important to close this stream properly!
getStream in interface ContentStreampublic void setStream(InputStream stream)
MutableContentStreamsetStream in interface MutableContentStreamstream - the streampublic String toString()
toString in class AbstractExtensionDataCopyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.