Package com.atlassian.confluence.core
Class InputStreamExceptionDecorator
java.lang.Object
java.io.InputStream
com.atlassian.confluence.core.InputStreamExceptionDecorator
- All Implemented Interfaces:
Closeable
,AutoCloseable
@ParametersAreNonnullByDefault
@ReturnValuesAreNonnullByDefault
public class InputStreamExceptionDecorator
extends InputStream
Decorator for potential
IOExceptions
thrown by an InputStream
.- Since:
- 5.2
-
Constructor Summary
ConstructorsConstructorDescriptionInputStreamExceptionDecorator
(InputStream delegate, com.google.common.base.Function<IOException, @NonNull IOException> exceptionDecorator) Deprecated.since 7.9.InputStreamExceptionDecorator
(InputStream delegate, Function<IOException, @NonNull IOException> exceptionDecorator) Decorates the given InputStream so that any IOExceptions thrown are decorated by the givenFunction
. -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
InputStreamExceptionDecorator
@Deprecated public InputStreamExceptionDecorator(InputStream delegate, com.google.common.base.Function<IOException, @NonNull IOException> exceptionDecorator) Deprecated.since 7.9. UseInputStreamExceptionDecorator(InputStream, Function)
instead.Decorates the given InputStream so that any IOExceptions thrown are decorated by the givenFunction
.- Parameters:
delegate
- the InputStream to decorateexceptionDecorator
- the decorator function
-
InputStreamExceptionDecorator
public InputStreamExceptionDecorator(InputStream delegate, Function<IOException, @NonNull IOException> exceptionDecorator) Decorates the given InputStream so that any IOExceptions thrown are decorated by the givenFunction
.- Parameters:
delegate
- the InputStream to decorateexceptionDecorator
- the decorator function- Since:
- 7.9
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-