StreamReadException

Inheritance: java.lang.Object, java.lang.Throwable, java.lang.Exception, java.lang.RuntimeException, com.aspose.ms.System.Exception, com.aspose.imaging.coreexceptions.FrameworkException

public class StreamReadException extends FrameworkException

The stream reading exception. Caused when stream reading failed due to incorrect offset and bytes count request.

Constructors

ConstructorDescription
StreamReadException(String message)Initializes a new instance of the StreamReadException class.
StreamReadException(String message, Throwable innerException)Initializes a new instance of the StreamReadException class.
StreamReadException(String message, Throwable innerException, int expectedReadCount, int actualReadCount)Initializes a new instance of the StreamReadException class.
StreamReadException(String message, int expectedReadCount, int actualReadCount)Initializes a new instance of the StreamReadException class.

Methods

MethodDescription
getExpectedReadCount()Gets the expected read bytes count.
getActualReadCount()Gets the actual read bytes count.

StreamReadException(String message)

public StreamReadException(String message)

Initializes a new instance of the StreamReadException class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message.

StreamReadException(String message, Throwable innerException)

public StreamReadException(String message, Throwable innerException)

Initializes a new instance of the StreamReadException class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message.
innerExceptionjava.lang.ThrowableThe inner exception.

StreamReadException(String message, Throwable innerException, int expectedReadCount, int actualReadCount)

public StreamReadException(String message, Throwable innerException, int expectedReadCount, int actualReadCount)

Initializes a new instance of the StreamReadException class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message.
innerExceptionjava.lang.ThrowableThe inner exception.
expectedReadCountintThe expected read count.
actualReadCountintThe actual read count.

StreamReadException(String message, int expectedReadCount, int actualReadCount)

public StreamReadException(String message, int expectedReadCount, int actualReadCount)

Initializes a new instance of the StreamReadException class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message.
expectedReadCountintThe expected read count.
actualReadCountintThe actual read count.

getExpectedReadCount()

public int getExpectedReadCount()

Gets the expected read bytes count.

Returns: int - The expected read bytes count.

getActualReadCount()

public int getActualReadCount()

Gets the actual read bytes count.

Returns: int - The actual read bytes count.