xdb.type ="form";
XDataFieldBuilder xdfb = new XDataFieldBuilder();
xdfb.var="stream-method";
xdfb.type="list-single";
if (Preferences.getBoolean("filetransfer","bytestreams.enable",true)) {
xdfb.addOption("http://jabber.org/protocol/bytestreams");
}
if (Preferences.getBoolean("filetransfer", "ibb.enable", true)) {
xdfb.addOption("http://jabber.org/protocol/ibb");
}
xdb.addField(xdfb.build());