protected void streamCopy (InputStream in, OutputStream out)
            throws IOException {
        logger.entering(getClass().getName(), "streamCopy");

        byte[] buf = new byte[8192];
        int bytesRead;
        do {
            bytesRead = in.read(buf);
            if (bytesRead > 0)
                out.write(buf, 0, bytesRead);
        } while (bytesRead >= 0);

        logger.exiting(getClass().getName(), "streamCopy");
    }