@@ -0,0 +1,750 @@
+package org.bouncycastle.util.io;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0Apublic final class Streams%0A%7B%0A    private static int BUFFER_SIZE = 512;%0A%0A    public static byte%5B%5D readAll(InputStream inStr)%0A        throws IOException%0A    %7B%0A        ByteArrayOutputStream buf = new ByteArrayOutputStream();%0A        doPipe(inStr, buf);%0A        return buf.toByteArray();%0A    %7D%0A%0A    private static void doPipe(InputStream inStr, OutputStream outStr)%0A        throws IOException%0A    %7B%0A        byte%5B%5D bs = new byte%5BBUFFER_SIZE%5D;%0A        int numRead;%0A        while ((numRead = inStr.read(bs, 0, bs.length)) %3E= 0)%0A        %7B%0A            outStr.write(bs, 0, numRead);%0A        %7D%0A    %7D%0A%7D%0A

Add utility class