Class MediaExtractor
java.lang.Object
de.hybris.platform.platformbackoffice.widgets.impex.MediaExtractor
Extracts information about the media.
-
Constructor Summary
ConstructorsConstructorDescriptionMediaExtractor(org.zkoss.util.media.Media uploadedMedia) Creates instance ofMediaExtractor -
Method Summary
Modifier and TypeMethodDescriptionReturns the content type of the media.Extracts and returns the information as aInputStreamusing the default UTF-8 Charset.getDataAsStream(Charset encoding) Extracts and returns the information as aInputStream.Extracts and returns the information as a string.longReturns the information about the size of the media file.getName()Returns the media name.Returns the name of a file that will be created to store the uploaded file.
-
Constructor Details
-
MediaExtractor
public MediaExtractor(org.zkoss.util.media.Media uploadedMedia) Creates instance ofMediaExtractor- Parameters:
uploadedMedia- media of which the information should be extracted
-
-
Method Details
-
getDataAsString
Extracts and returns the information as a string.- Returns:
- information about the media
-
getDataAsStream
Extracts and returns the information as aInputStream.- Parameters:
encoding- the encoding that should be used when extracting data- Returns:
- input stream containing information about the media
-
getDataAsStream
Extracts and returns the information as aInputStreamusing 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
Returns the media name.- Returns:
- media name
-
getTargetName
Returns the name of a file that will be created to store the uploaded file.- Returns:
- uploaded file name
-
getContentType
Returns the content type of the media.- Returns:
- media content type
-