public class MultiplePipedInputStream extends Object implements VitamAutoCloseable
| Constructor and Description |
|---|
MultiplePipedInputStream(InputStream source,
int nbCopy)
Create one MultipleInputStreamHandler from one InputStream and make nbCopy linked InputStreams
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
copy(InputStream source,
PipedOutputStream[] outs) |
InputStream |
getInputStream(int rank)
Get the rank-th linked InputStream
|
void |
hasException() |
public MultiplePipedInputStream(InputStream source, int nbCopy) throws IOException
source - nbCopy - IOException - if any error in IO occursIllegalArgumentException - if source is null or nbCopy <= 0 or global service is downpublic InputStream getInputStream(int rank) throws IOException
rank - between 0 and nbCopy-1IOException - if any error in IO occursIllegalArgumentException - if rank < 0 or rank >= nbCopypublic void hasException()
throws IOException
IOException - if any exception is found during multiple streamsprotected final void copy(InputStream source, PipedOutputStream[] outs) throws IOException
IOExceptionpublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseableCopyright © 2018 Vitam. All rights reserved.