@@ -0,0 +1,1215 @@
+package org.spoofax.terms.util;%0A%0Aimport java.io.BufferedInputStream;%0Aimport java.io.BufferedOutputStream;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0A/**%0A * Utility method for working with input/output streams.%0A */%0Apublic final class IOStreamExt %7B%0A    private IOStreamExt() %7B /* Cannot be instantiated. */ %7D%0A%0A    /**%0A     * Ensures the input stream is buffered,%0A     * while avoiding double buffering.%0A     *%0A     * @param inputStream the input stream to buffer%0A     * @return the buffered input stream%0A     */%0A    public static BufferedInputStream ensureBuffered(InputStream inputStream) %7B%0A        if (inputStream instanceof BufferedInputStream) return (BufferedInputStream)inputStream;%0A        return new BufferedInputStream(inputStream);%0A    %7D%0A%0A    /**%0A     * Ensures the output stream is buffered,%0A     * while avoiding double buffering.%0A     *%0A     * @param outputStream the output stream to buffer%0A     * @return the buffered output stream%0A     */%0A    public static BufferedOutputStream ensureBuffered(OutputStream outputStream) %7B%0A        if (outputStream instanceof BufferedOutputStream) return (BufferedOutputStream)outputStream;%0A        return new BufferedOutputStream(outputStream);%0A    %7D%0A%7D%0A

Add IOStreamExt