final String isoEncoding, final boolean hasWinEncoding,
final String winEncoding, final String encoding,
final String expEncoding) {
String data = "ab";
ByteArrayInputStream bin = new ByteArrayInputStream( data.getBytes() );
EncodingUtil encUtl = new EncodingUtil(bin);
super.append("----------");
super.append(new StringItem("hasIso8859Encoding=",
new Boolean(hasIso8859Encoding).toString()));
super.append(new StringItem("isoEncoding=", isoEncoding));
super.append(new StringItem("hasWinEncoding=",
new Boolean(hasWinEncoding).toString()));
super.append(new StringItem("winEncoding=", winEncoding));
super.append(new StringItem("encoding=", encoding));
encUtl.getEncoding(hasIso8859Encoding, isoEncoding, hasWinEncoding,
winEncoding, "BIG-5", encoding);
super.append(new StringItem("(" + tstName + ") Exp Result:", "\n" +
expEncoding));
final String actEncoding = encUtl.getDocEncoding();
super.append(new StringItem("(" + tstName + ") Act Result: ", "\n" +
actEncoding));
super.append("\n" + new Boolean(actEncoding.equals(
expEncoding)).toString());
Vector excs = encUtl.getExcs();
for (int ic = 0; ic < excs.size(); ic++) {
Exception exc = (Exception)excs.elementAt(ic);
super.append(new StringItem("exc " + ic, "\n" +
exc.getMessage()));
}