public final class StringResult extends Object implements IOperationResult
Represents operation result in the form of string.
| Constructor and Description |
|---|
StringResult(String result)
Initializes new StringResult instance with a string.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getData()
Gets raw data.
|
String |
getText()
Returns string representation of the result.
|
boolean |
isByteArray()
Indicates whether the result is a bytes array.
|
boolean |
isFile()
Indicates whether the result is a path to an output file.
|
boolean |
isStream()
Indicates whether the result is a path to an output file.
|
boolean |
isString()
Indicates whether the result is a string.
|
String |
toFile()
Tries to convert the result to a file.
|
OutputStream |
toStream()
Tries to convert the result to a stream object.
|
String |
toString()
Tries to convert the result to a string.
|
public StringResult(String result)
Initializes new StringResult instance with a string.
result - String representing the resultpublic final boolean isFile()
Indicates whether the result is a path to an output file.
isFile in interface IOperationResulttrue if the result is a file; otherwise false.public final boolean isStream()
Indicates whether the result is a path to an output file.
isStream in interface IOperationResulttrue if the result is a stream object; otherwise false.public final boolean isString()
Indicates whether the result is a string.
isString in interface IOperationResulttrue if the result is a string; otherwise false.public final boolean isByteArray()
Indicates whether the result is a bytes array.
isByteArray in interface IOperationResulttrue if the result is a bytes array; otherwise false.public final Object getData()
Gets raw data.
getData in interface IOperationResultobject representing output data.public final String toFile()
Tries to convert the result to a file.
toFile in interface IOperationResultnull.public final OutputStream toStream()
Tries to convert the result to a stream object.
toStream in interface IOperationResultnull.public String toString()
Tries to convert the result to a string.
public final String getText()
Returns string representation of the result.
Copyright © 2025 Aspose. All Rights Reserved.