IOperationResult

public interface IOperationResult

The general operation result interface.

Methods

MethodDescription
isFile()Indicates whether the result is a file path.
isStream()Indicates whether the result is a stream.
isString()Indicates whether the result is a string.
isByteArray()Indicates whether the result is a byte array.
getData()Gets raw data.
toFile()Tries to convert the result to a file.
toStream()Tries to convert the result to a stream.

isFile()

public abstract boolean isFile()

Indicates whether the result is a file path.

Returns: boolean - True if the result is a file path; otherwise false .

isStream()

public abstract boolean isStream()

Indicates whether the result is a stream.

Returns: boolean - True if the result is a stream; otherwise false .

isString()

public abstract boolean isString()

Indicates whether the result is a string.

Returns: boolean - True if the result is a string; otherwise false .

isByteArray()

public abstract boolean isByteArray()

Indicates whether the result is a byte array.

Returns: boolean - True if the result is a byte array; otherwise false .

getData()

public abstract Object getData()

Gets raw data.

Returns: java.lang.Object - An object containing output data.

toFile()

public abstract String toFile()

Tries to convert the result to a file.

Returns: java.lang.String - A string the file path if the result is file; otherwise null .

toStream()

public abstract OutputStream toStream()

Tries to convert the result to a stream.

Returns: java.io.OutputStream - A stream if the result is stream; otherwise null .