001
014
015 package com.liferay.portal.kernel.util;
016
017 import java.io.InputStream;
018
019
022 public class DocumentConversionUtil {
023
024 public static InputStream convert(
025 String id, InputStream is, String sourceExtension,
026 String targetExtension)
027 throws Exception {
028
029 Object returnObj = PortalClassInvoker.invoke(
030 _CLASS, "convert",
031 new Object[] {id, is, sourceExtension, targetExtension}, false);
032
033 if (returnObj != null) {
034 return (InputStream)returnObj;
035 }
036 else {
037 return null;
038 }
039 }
040
041 public static String[] getConversions(String extension) throws Exception {
042 Object returnObj = PortalClassInvoker.invoke(
043 _CLASS, "getConversions", new Object[] {extension}, false);
044
045 if (returnObj != null) {
046 return (String[])returnObj;
047 }
048 else {
049 return null;
050 }
051 }
052
053 private static final String _CLASS =
054 "com.liferay.portlet.documentlibrary.util.DocumentConversionUtil";
055
056 }