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:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-