com.dtolabs.rundeck.core.storage
Class BaseStreamResource

java.lang.Object
  extended by com.dtolabs.rundeck.core.storage.BaseStreamResource
All Implemented Interfaces:
ResourceMeta, ContentMeta, HasInputStream

public class BaseStreamResource
extends java.lang.Object

BaseStreamResource is ...

Since:
2014-03-28

Constructor Summary
BaseStreamResource(java.util.Map<java.lang.String,java.lang.String> meta, HasInputStream stream)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseStreamResource

public BaseStreamResource(java.util.Map<java.lang.String,java.lang.String> meta,
                          HasInputStream stream)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Throws:
java.io.IOException

writeContent

public long writeContent(java.io.OutputStream outputStream)
                  throws java.io.IOException
Description copied from interface: HasInputStream
Write the content stream to the output stream

Returns:
the content stream
Throws:
java.io.IOException

getMeta

public java.util.Map<java.lang.String,java.lang.String> getMeta()
Description copied from interface: ContentMeta
Return the metadata about the content

Specified by:
getMeta in interface ContentMeta
Returns:
the metadata

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface ResourceMeta

getContentLength

public long getContentLength()
Specified by:
getContentLength in interface ResourceMeta

getModificationTime

public java.util.Date getModificationTime()
Specified by:
getModificationTime in interface ResourceMeta

getCreationTime

public java.util.Date getCreationTime()
Specified by:
getCreationTime in interface ResourceMeta