Hi, Jochen,
Thanks for pointing out that method. I was looking for a static
method. I didn't expect it to be an instance method! Anyway, now
that I've found it, ws-commons-util is the winner!
[16.203 seconds] ws-commons-util THE WINNER!!!!
[21.946 seconds] not-yet-commons-ssl
(For some reason not-yet-commons-ssl starting running faster....
weird. But sun, iharder, and openssl didn't change!)
Here's how I used ws-commons-util:
FileInputStream fi = new FileInputStream(args[0]);
InputStream in = new BufferedInputStream(fi);
InputStreamReader reader = new InputStreamReader(in, "US-ASCII");
char[] buf = new char[8192];
Base64 b64 = new Base64();
Writer w = b64.newDecoder(out);
long start = System.currentTimeMillis();
int c = reader.read(buf);
while (c >= 0) {
if (c > 0) {
w.write(buf, 0, c);
}
c = reader.read(buf);
}
long duration = System.currentTimeMillis() - start;
yours,
Julius
On Sat, May 31, 2008 at 1:18 AM, Jochen Wiedmann
<[EMAIL PROTECTED]> wrote:
> On Sat, May 31, 2008 at 9:06 AM, Julius Davies <[EMAIL PROTECTED]> wrote:
>
>> I also tried to test with ws-common, but the Base64 library in there
>> doesn't have a streaming decoder, so I don't think it can handle a
>> 700MB file.
>
> And what do you think that
>
>
> http://ws.apache.org/commons/util/apidocs/org/apache/ws/commons/util/Base64.html#newDecoder(java.io.OutputStream)
>
> is? For performance tuning, increasing the underlying buffer might be
> important.
>
> Jochen
>
>
> --
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
>
> -- (Terry Pratchett, Thief of Time)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
yours,
Julius Davies
250-592-2284 (Home)
250-893-4579 (Mobile)
http://juliusdavies.ca/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]