public class MediaExtractor
extends java.lang.Object
| Constructor and Description |
|---|
MediaExtractor(Media uploadedMedia)
Creates instance of
MediaExtractor |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentType()
Returns the content type of the media.
|
java.io.InputStream |
getDataAsStream()
Extracts and returns the information as a
InputStream using the default UTF-8 Charset. |
java.io.InputStream |
getDataAsStream(java.nio.charset.Charset encoding)
Extracts and returns the information as a
InputStream. |
java.lang.String |
getDataAsString()
Extracts and returns the information as a string.
|
long |
getDataSize()
Returns the information about the size of the media file.
|
java.lang.String |
getName()
Returns the media name.
|
java.lang.String |
getTargetName()
Returns the name of a file that will be created to store the uploaded file.
|
public MediaExtractor(Media uploadedMedia)
MediaExtractoruploadedMedia - media of which the information should be extractedpublic java.lang.String getDataAsString()
public java.io.InputStream getDataAsStream(java.nio.charset.Charset encoding)
InputStream.encoding - the encoding that should be used when extracting datapublic java.io.InputStream getDataAsStream()
InputStream using the default UTF-8 Charset.public long getDataSize()
public java.lang.String getName()
public java.lang.String getTargetName()
public java.lang.String getContentType()
Copyright © 2018 SAP SE. All Rights Reserved.