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