Package org.alfresco.util
Class InputStreamContent
- java.lang.Object
-
- org.alfresco.util.InputStreamContent
-
- All Implemented Interfaces:
java.io.Serializable
,Content
public class InputStreamContent extends java.lang.Object implements Content, java.io.Serializable
Input Stream based Content- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InputStreamContent(java.io.InputStream stream, java.lang.String mimetype, java.lang.String encoding)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContent()
Gets content as a stringjava.lang.String
getEncoding()
Gets the content encodingjava.io.InputStream
getInputStream()
Gets the content input streamjava.lang.String
getMimetype()
Gets the content mimetypejava.io.Reader
getReader()
Gets the content reader (which is sensitive to encoding)long
getSize()
Gets the content length (in bytes)
-
-
-
Method Detail
-
getContent
public java.lang.String getContent() throws java.io.IOException
Description copied from interface:Content
Gets content as a string- Specified by:
getContent
in interfaceContent
- Returns:
- content as a string
- Throws:
java.io.IOException
-
getInputStream
public java.io.InputStream getInputStream()
Description copied from interface:Content
Gets the content input stream- Specified by:
getInputStream
in interfaceContent
- Returns:
- input stream
-
getReader
public java.io.Reader getReader() throws java.io.IOException
Description copied from interface:Content
Gets the content reader (which is sensitive to encoding)
-
getSize
public long getSize()
Description copied from interface:Content
Gets the content length (in bytes)
-
getMimetype
public java.lang.String getMimetype()
Description copied from interface:Content
Gets the content mimetype- Specified by:
getMimetype
in interfaceContent
- Returns:
- mimetype
-
getEncoding
public java.lang.String getEncoding()
Description copied from interface:Content
Gets the content encoding- Specified by:
getEncoding
in interfaceContent
- Returns:
- encoding
-
-