public class RecognitionResultHolder extends Object
Constructor and Description |
---|
RecognitionResultHolder(RecognitionResult result)
Creates an instance with specified result.
|
Modifier and Type | Method and Description |
---|---|
RecognitionResult |
getResult()
Retrieve result object.
|
static RecognitionResultHolder |
readFromJson(InputStream is)
Reads result from input stream containing the recognition result in JSON format.
|
void |
writeToJson(File outputJson)
Writes holded result into the specified file as JSON.
|
void |
writeToJson(File outputJson, SerializationProperties properties)
Writes holded result into the specified file as JSON.
|
void |
writeToJson(OutputStream jsonOutputStream)
Writes holded result into the specified output stream as JSON.
|
void |
writeToJson(OutputStream jsonOutputStream, SerializationProperties properties)
Writes holded result into the specified output stream as JSON.
|
void |
writeToXml(File outputXml)
Saves recognition results to provided xml file.
|
void |
writeToXml(File outputXml, SerializationProperties properties)
Saves recognition results to provided xml file.
|
void |
writeToXml(OutputStream xmlOutputStream)
Saves recognition results to output stream in xml form.
|
void |
writeToXml(OutputStream xmlOutputStream, SerializationProperties properties)
Saves recognition results to output stream in xml form.
|
public RecognitionResultHolder(RecognitionResult result)
result
- recognition result to be used in holder
public static RecognitionResultHolder readFromJson(InputStream is)
is
- the InputStream
to read from
RecognitionResultHolder
based on the read result
InvalidResultException
- if the read result has invalid schema version
public RecognitionResult getResult()
RecognitionResult
instance
public void writeToJson(File outputJson) throws IOException
outputJson
- the File
to write into
IOException
- if any I/O exception occurs
public void writeToJson(File outputJson, SerializationProperties properties) throws IOException
outputJson
- the File
to write into
properties
- serialization properties
IOException
- if any I/O exception occurs
public void writeToJson(OutputStream jsonOutputStream)
jsonOutputStream
- the OutputStream
to write into
public void writeToJson(OutputStream jsonOutputStream, SerializationProperties properties)
jsonOutputStream
- the OutputStream
to write into
properties
- serialization properties
public void writeToXml(File outputXml) throws IOException
outputXml
- xml file
IOException
- if any I/O exception occurs
public void writeToXml(File outputXml, SerializationProperties properties) throws IOException
outputXml
- output stream
properties
- a SerializationProperties
instance
IOException
- if any I/O exception occurs
public void writeToXml(OutputStream xmlOutputStream) throws IOException
xmlOutputStream
- output stream
IOException
- if any I/O exception occurs
public void writeToXml(OutputStream xmlOutputStream, SerializationProperties properties) throws IOException
xmlOutputStream
- output stream
properties
- a SerializationProperties
instance
IOException
- if any I/O exception occurs
Copyright © 2024. All rights reserved.