public class BaseStreamResource
extends java.lang.Object
Constructor and Description |
---|
BaseStreamResource(java.util.Map<java.lang.String,java.lang.String> meta,
HasInputStream stream) |
Modifier and Type | Method and Description |
---|---|
long |
getContentLength() |
java.lang.String |
getContentType() |
java.util.Date |
getCreationTime() |
java.io.InputStream |
getInputStream() |
java.util.Map<java.lang.String,java.lang.String> |
getMeta()
Return the metadata about the content
|
java.util.Date |
getModificationTime() |
long |
writeContent(java.io.OutputStream outputStream)
Write the content stream to the output stream
|
public BaseStreamResource(java.util.Map<java.lang.String,java.lang.String> meta, HasInputStream stream)
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public long writeContent(java.io.OutputStream outputStream) throws java.io.IOException
HasInputStream
outputStream
- output streamjava.io.IOException
- on io errorpublic java.util.Map<java.lang.String,java.lang.String> getMeta()
ContentMeta
getMeta
in interface ContentMeta
public java.lang.String getContentType()
getContentType
in interface ResourceMeta
public long getContentLength()
getContentLength
in interface ResourceMeta
public java.util.Date getModificationTime()
getModificationTime
in interface ResourceMeta
public java.util.Date getCreationTime()
getCreationTime
in interface ResourceMeta