Package org.scijava.io.handle
Class DataHandleInputStream<L extends Location>
- java.lang.Object
-
- java.io.InputStream
-
- org.scijava.io.handle.DataHandleInputStream<L>
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DataHandleInputStream<L extends Location> extends InputStream
InputStreambacked by aDataHandle.- Author:
- Curtis Rueden, Melissa Linkert
-
-
Constructor Summary
Constructors Constructor Description DataHandleInputStream(DataHandle<L> handle)Creates an input stream around the givenDataHandle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()DataHandle<L>getDataHandle()voidmark(int readLimit)booleanmarkSupported()intread()intread(byte[] array, int offset, int n)voidreset()longskip(long n)-
Methods inherited from class java.io.InputStream
read
-
-
-
-
Constructor Detail
-
DataHandleInputStream
public DataHandleInputStream(DataHandle<L> handle)
Creates an input stream around the givenDataHandle.
-
-
Method Detail
-
getDataHandle
public DataHandle<L> getDataHandle()
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] array, int offset, int n) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
mark
public void mark(int readLimit)
- Overrides:
markin classInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-