code: public String encodeBuffer(byte aBuffer[]) {
          ByteArrayOutputStream   outStream = new ByteArrayOutputStream();
          ByteArrayInputStream    inStream = new ByteArrayInputStream(aBuffer);
          try {
              encodeBuffer(inStream, outStream);
          } catch (Exception IOException) {
              // This should never happen.
              throw new Error("CharacterEncoder.encodeBuffer internal error");
          }
          return (outStream.toString());
      }
docs: A 'streamless' version of encode that simply takes a buffer of
  bytes and returns a string containing the encoded buffer.