Interface Media

All Known Subinterfaces:
Audio, Image, Video
All Known Implementing Classes:
AAudio, AImage, AMedia, AVideo, RepeatableMedia

public interface Media
Represents any multi-media, such as a voice, a pdf file, an excel file, an image and so on.

By implementing this interface, objects can be processed generically by servlets and many other codes.

Author:
tomyeh
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the raw data in byte array.
    Returns the content type, e.g., "image/jpeg", or null if not available.
    Returns the format name, e.g., "jpeg", or null if not available.
    Returns the name (usually filename) of this media, or null if not available.
    Returns the raw data in Reader.
    Returns the raw data in InputStream.
    Returns the raw data in string.
    boolean
    Returns whether the data is cached in memory (in form of byte[] or String).
    boolean
    Returns whether the format of this content is binary or text-based.
    boolean
    Whether to allow Content-Disposition or not when writing the media to response header.