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.ProxyInputStreamAnInputStreamthat fetches the actual stream from aSupplieron first use.- Since:
- 7.10
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.io.input.ProxyInputStream
org.apache.commons.io.input.ProxyInputStream.AbstractBuilder<T extends Object,B extends org.apache.commons.io.build.AbstractStreamBuilder<T,B>>
-
-
Field Summary
Fields Modifier and Type Field Description protected Supplier<InputStream>supplier-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description LazyInputStream(Supplier<InputStream> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()protected voidbeforeRead(int n)voidclose()voidmark(int readlimit)booleanmarkSupported()voidreset()longskip(long ln)-
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, handleIOException, read, read, read, unwrap
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Field Detail
-
supplier
protected Supplier<InputStream> supplier
-
-
Constructor Detail
-
LazyInputStream
public LazyInputStream(Supplier<InputStream> supplier)
-
-
Method Detail
-
beforeRead
protected void beforeRead(int n)
- Overrides:
beforeReadin classorg.apache.commons.io.input.ProxyInputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
skip
public long skip(long ln) throws IOException- Overrides:
skipin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classorg.apache.commons.io.input.ProxyInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classorg.apache.commons.io.input.ProxyInputStream
-
-