Class NuxeoContentStream.LazyInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.nuxeo.ecm.core.opencmis.impl.server.NuxeoContentStream.LazyInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- NuxeoContentStream
public static class NuxeoContentStream.LazyInputStream
extends org.apache.commons.io.input.ProxyInputStream
An
InputStream
that fetches the actual stream from a Supplier
on first use.- Since:
- 7.10
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
protected void
beforeRead
(int n) void
close()
void
mark
(int readlimit) boolean
void
reset()
long
skip
(long ln) Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, handleIOException, read, read, read
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
supplier
-
-
Constructor Details
-
LazyInputStream
-
-
Method Details
-
beforeRead
protected void beforeRead(int n) - Overrides:
beforeRead
in classorg.apache.commons.io.input.ProxyInputStream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
mark
in classorg.apache.commons.io.input.ProxyInputStream
-
reset
- Overrides:
reset
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classorg.apache.commons.io.input.ProxyInputStream
-