if (args.length == 0) { // simply convert from System.in to System.out
InputStream in = new BufferedInputStream(System.in);
if (codec.isBnuxDocument(in)) {
StreamingSerializer ser = factory.createXMLSerializer(System.out, "UTF-8");
NodeFactory redirector = XOMUtil.getRedirectingNodeFactory(ser);
codec.deserialize(in, redirector);
} else { // it's an XML document (or rubbish)
StreamingSerializer ser = factory.createBinaryXMLSerializer(System.out, compressionLevel);
NodeFactory redirector = XOMUtil.getRedirectingNodeFactory(ser);
new Builder(redirector).build(in);
}