public class TypeAwareByteSource extends ByteSource
ByteSource which knows about content mime type| Constructor and Description |
|---|
TypeAwareByteSource(ByteSource delegate,
java.lang.String mediaType) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getMediaType() |
java.io.InputStream |
openStream()
Return new
InputStream object which can be read and closed naturally. |
openBufferedStream, read, wrappublic TypeAwareByteSource(@Nonnull
ByteSource delegate,
@Nonnull
java.lang.String mediaType)
@Nonnull
public java.io.InputStream openStream()
throws java.io.IOException
ByteSourceInputStream object which can be read and closed naturally.openStream in class ByteSourcejava.io.IOException - reading error or null byte source@Nonnull public java.lang.String getMediaType()