OutputStream nullOut = new NullOutputStream();
for (int i = 0; i < 5; i++) {
ByteArrayInputStream ed = new ByteArrayInputStream(encoded);
InputStream in = new Base64InputStream(ed);
CodecUtil.copy(in, nullOut);
}
Thread.sleep(100);
// test
long t0 = System.currentTimeMillis();
final int repetitions = 50;
for (int i = 0; i < repetitions; i++) {
ByteArrayInputStream ed = new ByteArrayInputStream(encoded);
InputStream in = new Base64InputStream(ed);
CodecUtil.copy(in, nullOut);
}
long dt = System.currentTimeMillis() - t0;
long totalBytes = data.length * (long) repetitions;