Package net.ontopia.persistence.proxy
Class ContentInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- net.ontopia.persistence.proxy.ContentInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ContentInputStream extends FilterInputStream
INTERNAL: InputStream that knows its length.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanclosedprotected longlengthprotected longlengthRead-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ContentInputStream(InputStream stream, long length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetLength()intread()intread(byte[] bbuf)intread(byte[] bbuf, int off, int len)-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ContentInputStream
public ContentInputStream(InputStream stream, long length)
-
-
Method Detail
-
getLength
public long getLength()
-
read
public int read() throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] bbuf) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] bbuf, int off, int len) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
-