public final class ConversionUtils
extends java.lang.Object
DocumentConversion
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getMediaTypeFromFile(java.io.File file)
Returns the media type for a given file.
|
static boolean |
isValidMediaType(java.lang.String mediaType)
Checks if the media type is supported by the service.
|
static com.google.gson.JsonObject |
loadCustomConfig(java.io.InputStream customConfig)
Loads a custom configuration from the input stream specified.
|
static java.lang.String |
writeInputStreamToString(java.io.InputStream is)
Write input stream to output stream.
|
public static java.lang.String getMediaTypeFromFile(java.io.File file)
file
- the file object for which media type needs to be providedpublic static boolean isValidMediaType(java.lang.String mediaType)
mediaType
- Internet media type for the filepublic static com.google.gson.JsonObject loadCustomConfig(java.io.InputStream customConfig)
customConfig
- input stream for the custom configurationpublic static java.lang.String writeInputStreamToString(java.io.InputStream is)
is
- the input stream