public class InputStreamContent extends Object implements Content, Serializable
Constructor and Description |
---|
InputStreamContent(InputStream stream,
String mimetype,
String encoding)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getContent()
Gets content as a string
|
String |
getEncoding()
Gets the content encoding
|
InputStream |
getInputStream()
Gets the content input stream
|
String |
getMimetype()
Gets the content mimetype
|
Reader |
getReader()
Gets the content reader (which is sensitive to encoding)
|
long |
getSize()
Gets the content length (in bytes)
|
public InputStreamContent(InputStream stream, String mimetype, String encoding)
stream
- content input streammimetype
- content mimetypepublic String getContent() throws IOException
Content
getContent
in interface Content
IOException
public InputStream getInputStream()
Content
getInputStream
in interface Content
public Reader getReader() throws IOException
Content
getReader
in interface Content
IOException
public long getSize()
Content
public String getMimetype()
Content
getMimetype
in interface Content
public String getEncoding()
Content
getEncoding
in interface Content
Copyright © 2005–2020 Alfresco Software. All rights reserved.