public static void encodeStream(InputStream in, BufferedWriter out)
			throws IOException {
		int lineLength = 72;
		byte[] buf = new byte[lineLength / 4 * 3];
		while (true) {
			int len = in.read(buf);
			if (len <= 0)
				break;
			out.write(Base64Coder.encode(buf, 0, len));
			out.newLine();
		}
	}