Package com.aoindustries.io
Class MultiFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.aoindustries.io.MultiFileInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MultiFileInputStream extends InputStream
AMultiFileInputStreamreads multipleFiles as if they were one contiguous file.- Author:
- AO Industries, Inc.
-
-
Constructor Summary
Constructors Constructor Description MultiFileInputStream(File[] files)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()longlength()Gets the total number of bytes in all the files that will be read.voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] buff)intread(byte[] buff, int off, int len)voidreset()longskip(long n)
-
-
-
Constructor Detail
-
MultiFileInputStream
public MultiFileInputStream(File[] files)
-
-
Method Detail
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] buff) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] buff, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
length
public long length()
Gets the total number of bytes in all the files that will be read.
-
-