}
if (bytes!=null) {
diOs.write(bytes);
return;
}else if (this.isElement()) {
Canonicalizer20010315OmitComments c14nizer =
new Canonicalizer20010315OmitComments();
c14nizer.setWriter(diOs);
c14nizer.engineCanonicalizeSubTree(this._subNode,this.excludeNode);
return;
} else if (this.isNodeSet()) {
/* If we have a node set but an octet stream is needed, we MUST c14nize
* without any comments.
*
* We don't use the factory because direct instantiation should be a
* little bit faster...
*/
Canonicalizer20010315OmitComments c14nizer =
new Canonicalizer20010315OmitComments();
c14nizer.setWriter(diOs);
if (this._inputNodeSet.size() == 0) {
// empty nodeset
return;
}
c14nizer.engineCanonicalizeXPathNodeSet(this._inputNodeSet);
return;
} else {
InputStream is = getResetableInputStream();
if (bytes!=null) {
//already read write it, can be rea.