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
AnInputStream
that fetches the actual stream from aSupplier
on 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 int
available()
protected void
beforeRead(int n)
void
close()
void
mark(int readlimit)
boolean
markSupported()
void
reset()
long
skip(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:
beforeRead
in classorg.apache.commons.io.input.ProxyInputStream
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
skip
public long skip(long ln) throws IOException
- Overrides:
skip
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
available
public int available() throws IOException
- 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
public void reset() throws IOException
- Overrides:
reset
in classorg.apache.commons.io.input.ProxyInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classorg.apache.commons.io.input.ProxyInputStream
-
-