Class ApiInvoker
- java.lang.Object
-
- com.aspose.cad.cloud.invoker.internal.ApiInvoker
-
public class ApiInvoker extends Object
API invoker class
-
-
Constructor Summary
Constructors Constructor Description ApiInvoker(IRequestHandler[] requestHandlers, Configuration configuration)
Initializes a new instance of the ApiInvoker class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
invokeApi(String path, String method, String body, HashMap<String,String> headerParams, HashMap<String,Object> formParams)
Invokes the API.byte[]
invokeApi(String path, String method, String body, HashMap<String,String> headerParams, HashMap<String,Object> formParams, String contentType)
Invokes the API.FileInfo
toFileInfo(byte[] data)
Converts bytes to the file information parameter.FileInfo
toFileInfo(byte[] data, String paramName)
Converts bytes to the file information parameter.FileInfo
toFileInfo(InputStream stream, String paramName)
Converts stream to the file information parameter.
-
-
-
Constructor Detail
-
ApiInvoker
public ApiInvoker(IRequestHandler[] requestHandlers, Configuration configuration)
Initializes a new instance of the ApiInvoker class.- Parameters:
requestHandlers
- The request handlers.configuration
- The configuration.
-
-
Method Detail
-
invokeApi
public byte[] invokeApi(String path, String method, String body, HashMap<String,String> headerParams, HashMap<String,Object> formParams) throws Exception
Invokes the API.- Parameters:
path
- The path.method
- The method.body
- The body.headerParams
- The header parameters.formParams
- The form parameters.- Returns:
- Resulting data.
- Throws:
Exception
-
invokeApi
public byte[] invokeApi(String path, String method, String body, HashMap<String,String> headerParams, HashMap<String,Object> formParams, String contentType) throws Exception
Invokes the API.- Parameters:
path
- The path.method
- The method.body
- The body.headerParams
- The header parameters.formParams
- The form parameters.contentType
- Type of the content.- Returns:
- Resulting data.
- Throws:
Exception
-
toFileInfo
public FileInfo toFileInfo(InputStream stream, String paramName) throws IOException
Converts stream to the file information parameter.- Parameters:
stream
- The stream.paramName
- Name of the parameter.- Returns:
- File information parameter.
- Throws:
IOException
-
toFileInfo
public FileInfo toFileInfo(byte[] data, String paramName)
Converts bytes to the file information parameter.- Parameters:
data
- The data bytes.paramName
- Name of the parameter.- Returns:
- File information parameter.
-
toFileInfo
public FileInfo toFileInfo(byte[] data)
Converts bytes to the file information parameter.- Parameters:
data
- The data bytes.- Returns:
- File information parameter.
-
-