Package org.alfresco.util
Class InputStreamContent
java.lang.Object
org.alfresco.util.InputStreamContent
- All Implemented Interfaces:
Serializable
,Content
Input Stream based Content
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInputStreamContent
(InputStream stream, String mimetype, String encoding) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGets content as a stringGets the content encodingGets the content input streamGets the content mimetypeGets the content reader (which is sensitive to encoding)long
getSize()
Gets the content length (in bytes)
-
Constructor Details
-
InputStreamContent
Constructor- Parameters:
stream
- content input streammimetype
- content mimetype
-
-
Method Details
-
getContent
Description copied from interface:Content
Gets content as a string- Specified by:
getContent
in interfaceContent
- Returns:
- content as a string
- Throws:
IOException
-
getInputStream
Description copied from interface:Content
Gets the content input stream- Specified by:
getInputStream
in interfaceContent
- Returns:
- input stream
-
getReader
Description copied from interface:Content
Gets the content reader (which is sensitive to encoding)- Specified by:
getReader
in interfaceContent
- Returns:
- Reader
- Throws:
IOException
-
getSize
public long getSize()Description copied from interface:Content
Gets the content length (in bytes) -
getMimetype
Description copied from interface:Content
Gets the content mimetype- Specified by:
getMimetype
in interfaceContent
- Returns:
- mimetype
-
getEncoding
Description copied from interface:Content
Gets the content encoding- Specified by:
getEncoding
in interfaceContent
- Returns:
- encoding
-