Package com.mindee.v2.parsing
Class LocalResponse
- java.lang.Object
-
- com.mindee.parsing.BaseLocalResponse
-
- com.mindee.v2.parsing.LocalResponse
-
public class LocalResponse extends BaseLocalResponse
A Mindee response saved locally.
-
-
Field Summary
-
Fields inherited from class com.mindee.parsing.BaseLocalResponse
file
-
-
Constructor Summary
Constructors Constructor Description LocalResponse(File input)LocalResponse(InputStream input)LocalResponse(String input)LocalResponse(Path input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CommonResponse>
TdeserializeResponse(Class<T> responseClass)Deserialize this local JSON payload into a specificCommonResponsesubtype:InferenceResponse,JobResponse.-
Methods inherited from class com.mindee.parsing.BaseLocalResponse
getFile, getHmacSignature, isValidHmacSignature
-
-
-
-
Constructor Detail
-
LocalResponse
public LocalResponse(InputStream input)
-
LocalResponse
public LocalResponse(String input)
-
LocalResponse
public LocalResponse(File input) throws IOException
- Throws:
IOException
-
LocalResponse
public LocalResponse(Path input) throws IOException
- Throws:
IOException
-
-
Method Detail
-
deserializeResponse
public <T extends CommonResponse> T deserializeResponse(Class<T> responseClass)
Deserialize this local JSON payload into a specificCommonResponsesubtype:InferenceResponse,JobResponse.- Type Parameters:
T- genericCommonResponse- Parameters:
responseClass- the concrete class to instantiate- Returns:
- Either a
InferenceResponseorJobResponseinstance. - Throws:
MindeeException- if the payload cannot be deserialized into the requested type
-
-