Class TypeAwareByteSource


  • public class TypeAwareByteSource
    extends ByteSource
    ByteSource which knows about content mime type
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMediaType()  
      java.io.InputStream openStream()
      Return new InputStream object which can be read and closed naturally.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.IOException
        Description copied from class: ByteSource
        Return new InputStream object which can be read and closed naturally.
        Overrides:
        openStream in class ByteSource
        Returns:
        stream
        Throws:
        java.io.IOException - reading error or null byte source
      • getMediaType

        @Nonnull
        public java.lang.String getMediaType()