java.lang.Object
de.hybris.platform.platformbackoffice.widgets.impex.MediaExtractor

public class MediaExtractor extends Object
Extracts information about the media.
  • Constructor Details

    • MediaExtractor

      public MediaExtractor(org.zkoss.util.media.Media uploadedMedia)
      Creates instance of MediaExtractor
      Parameters:
      uploadedMedia - media of which the information should be extracted
  • Method Details

    • getDataAsString

      public String getDataAsString()
      Extracts and returns the information as a string.
      Returns:
      information about the media
    • getDataAsStream

      public InputStream getDataAsStream(Charset encoding)
      Extracts and returns the information as a InputStream.
      Parameters:
      encoding - the encoding that should be used when extracting data
      Returns:
      input stream containing information about the media
    • getDataAsStream

      public InputStream getDataAsStream()
      Extracts and returns the information as a InputStream using the default UTF-8 Charset.
      Returns:
      input stream containing information about the media
    • getDataSize

      public long getDataSize()
      Returns the information about the size of the media file.
      Returns:
      media file size
    • getName

      public String getName()
      Returns the media name.
      Returns:
      media name
    • getTargetName

      public String getTargetName()
      Returns the name of a file that will be created to store the uploaded file.
      Returns:
      uploaded file name
    • getContentType

      public String getContentType()
      Returns the content type of the media.
      Returns:
      media content type