/** Returns an input stream encapsulating a nonempty fragment of an array of input streams. * * @param inputStream an array of input streams, that will be encapsulated. * @param offset the first input stream that will be encapsulated. * @param length the number of input streams to be encapsulated. * @return an input stream encapsulating the argument streams (the only argument, if length is 1). */ public static InputStream getStream( final InputStream[] inputStream, final int offset, final int length ) { if ( length == 0 ) return NullInputStream.getInstance(); if ( length == 1 ) return inputStream[ offset ]; return new MultipleInputStream( inputStream, offset ,length ); }
/** Returns an input stream encapsulating a nonempty fragment of an array of input streams. * * @param inputStream an array of input streams, that will be encapsulated. * @param offset the first input stream that will be encapsulated. * @param length the number of input streams to be encapsulated. * @return an input stream encapsulating the argument streams (the only argument, if length is 1). */ public static InputStream getStream(final InputStream[] inputStream, final int offset, final int length) { if (length == 0) return NullInputStream.getInstance(); if (length == 1) return inputStream[offset]; return new MultipleInputStream(inputStream, offset ,length); }
/** Returns an input stream encapsulating a nonempty fragment of an array of input streams. * * @param inputStream an array of input streams, that will be encapsulated. * @param offset the first input stream that will be encapsulated. * @param length the number of input streams to be encapsulated. * @return an input stream encapsulating the argument streams (the only argument, if length is 1). */ public static InputStream getStream( final InputStream[] inputStream, final int offset, final int length ) { if ( length == 0 ) return NullInputStream.getInstance(); if ( length == 1 ) return inputStream[ offset ]; return new MultipleInputStream( inputStream, offset ,length ); }