private void _testWriteArray(String str, String str_encoded) throws IOException
{
// create a Base64OutputStream
StringWriter strwriter = new StringWriter();
BufferedWriter buffwriter = new BufferedWriter(strwriter);
Base64OutputStream b64_out = new Base64OutputStream(buffwriter);
// convert str into an array of bytes
byte[] b = str.getBytes();
// write out the array to the output stream
b64_out.write(b, 0, b.length);
// append padding chars if necessary
b64_out.close();
// System.out.println("testwriteArray, expected encoding:" + str_encoded);
// System.out.println("testwriteArray, output of encoding:" + strwriter.toString());
// compare the contents of the outputstream with the expected encoded string