Package com.epam.reportportal.message
Class TypeAwareByteSource
- java.lang.Object
-
- com.epam.reportportal.utils.files.ByteSource
-
- com.epam.reportportal.message.TypeAwareByteSource
-
public class TypeAwareByteSource extends ByteSource
ByteSourcewhich knows about content mime type
-
-
Constructor Summary
Constructors Constructor Description TypeAwareByteSource(ByteSource delegate, java.lang.String mediaType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMediaType()java.io.InputStreamopenStream()Return newInputStreamobject which can be read and closed naturally.-
Methods inherited from class com.epam.reportportal.utils.files.ByteSource
openBufferedStream, read, wrap
-
-
-
-
Constructor Detail
-
TypeAwareByteSource
public TypeAwareByteSource(@Nonnull ByteSource delegate, @Nonnull java.lang.String mediaType)
-
-
Method Detail
-
openStream
@Nonnull public java.io.InputStream openStream() throws java.io.IOExceptionDescription copied from class:ByteSourceReturn newInputStreamobject which can be read and closed naturally.- Overrides:
openStreamin classByteSource- Returns:
- stream
- Throws:
java.io.IOException- reading error or null byte source
-
getMediaType
@Nonnull public java.lang.String getMediaType()
-
-