public final class StreamResult extends Object implements IOperationResult
Represents operation result in the form of Stream.
| Constructor and Description |
|---|
StreamResult(OutputStream stream)
Initializes a new instance with the specified stream object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getData()
Gets raw data.
|
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.
|
public StreamResult(OutputStream stream)
Initializes a new instance with the specified stream object.
stream - Stream objectpublic 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.Copyright © 2025 Aspose. All Rights Reserved.