// Create a PEDS with the indicated behavior
ParserInputStreamDataSource peds = new ParserInputStreamDataSource(is, "UTF-8", behavior);
// Create a OM tree with a root that contains an OMSourcedElement with a PADS
OMFactory factory = OMAbstractFactory.getOMFactory();
OMNamespace ns = factory.createOMNamespace("urn://sample", "my");
OMElement om = factory.createOMElement(peds, "payload", ns);
QName rootQName = new QName("urn://root", "root", "pre");
OMElement root = factory.createOMElement(rootQName);
root.addChild(om);