- public void direct(T t, OutputStream os, boolean ... options) throws APIException, IOException {
- Out out = df.getOut(outType);
- TimeTaken tt = trans.start(out.logName(),df.logType(outType)); // determine from Out.. without dependency on Env?
- try {
- if(df.marshal==null) { // Unknown marshaller... do working XML marshal/extraction
- if(outType.equals(TYPE.XML)) {
- df.jaxMar.marshal(trans.debug(), t, os, options);
- } else {
- StringWriter sw = new StringWriter();
- df.jaxMar.marshal(trans.debug(), t, sw, options);
- out.extract(new StringReader(xml = sw.toString()), new OutputStreamWriter(os), df.inXML,options);
- }
- } else {
- out.extract(t, new OutputStreamWriter(os), df.marshal,options);
- }
+ public void direct(T t, OutputStream os, boolean ... options) throws APIException, IOException {
+ Out out = df.getOut(outType);
+ TimeTaken tt = trans.start(out.logName(),df.logType(outType)); // determine from Out.. without dependency on Env?
+ try {
+ if (df.marshal==null) { // Unknown marshaller... do working XML marshal/extraction
+ if (outType.equals(TYPE.XML)) {
+ df.jaxMar.marshal(trans.debug(), t, os, options);
+ } else {
+ StringWriter sw = new StringWriter();
+ df.jaxMar.marshal(trans.debug(), t, sw, options);
+ out.extract(new StringReader(xml = sw.toString()), new OutputStreamWriter(os), df.inXML,options);
+ }
+ } else {
+ out.extract(t, new OutputStreamWriter(os), df.marshal,options);
+ }