Ostermillerutil Java Utilities Concatenation Streams - com.Ostermiller.util Java Utilities

Concatenation Streams allow multiple input sources to be combined into a singe source stream.



// Pre-pend data to a InputStream "in"
// giving a new stream.
in = new ConcatInputStream(
    new ByteArrayInputStream(
        new byte[]{



// Pre-pend data to a Reader "in"
// giving a new reader.
in = new ConcatReader(
    new StringReader(
        "Pre-pending this data."

Combines multiple character stream sources into a single character stream.


OstermillerUtil Java Utilities Copyright (c) 2001-2020 by Stephen Ostermiller and other contributors

The OstermillerUtils library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

License FAQs - Why GPL? How about the LGPL or something else?