Class SimpleRepositoryFileData
- java.lang.Object
-
- org.pentaho.platform.api.repository2.unified.data.simple.SimpleRepositoryFileData
-
- All Implemented Interfaces:
Serializable
,IRepositoryFileData
public class SimpleRepositoryFileData extends Object implements IRepositoryFileData
AIRepositoryFileData
that has an input stream, encoding, and optional MIME type.- Author:
- mlowery
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.pentaho.platform.api.repository2.unified.IRepositoryFileData
NODE_CONTENT_TYPE, SAMPLE_CONTENT_TYPE, SIMPLE_CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description SimpleRepositoryFileData(InputStream stream, String encoding, String mimeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getDataSize()
String
getEncoding()
Returns the character encoding of the bytes in the data stream.InputStream
getInputStream()
Returns a stream for reading the data in this file.String
getMimeType()
Returns the MIME type of the data in this file.InputStream
getStream()
Deprecated.UsegetInputStream()
instead.String
toString()
-
-
-
Constructor Detail
-
SimpleRepositoryFileData
public SimpleRepositoryFileData(InputStream stream, String encoding, String mimeType)
-
-
Method Detail
-
getStream
@Deprecated public InputStream getStream()
Deprecated.UsegetInputStream()
instead. Proguard likes to obfuscate any method named getStream that returns an InputStream, even if you tell it not to via keep rules.Returns a stream for reading the data in this file.- Returns:
- stream (may be
null
)
-
getInputStream
public InputStream getInputStream()
Returns a stream for reading the data in this file.- Returns:
- stream (may be
null
)
-
getEncoding
public String getEncoding()
Returns the character encoding of the bytes in the data stream. May benull
for non-character data.- Returns:
- character encoding
-
getMimeType
public String getMimeType()
Returns the MIME type of the data in this file.- Returns:
- MIME type
-
getDataSize
public long getDataSize()
- Specified by:
getDataSize
in interfaceIRepositoryFileData
-
-