Examples of writeTo()


Examples of ar.com.fdvs.dj.output.ReportWriter.writeTo()

    private void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap();
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);
        reportWriter.writeTo(_response);
    }

    private DynamicReport getDynamicReport(final ActionInvocation _invocation) {
        return (DynamicReport)conditionalParse(dynamicReport, _invocation, DynamicReport.class);
    }
View Full Code Here

Examples of bg.smoc.model.GradeProto.Grade.writeTo()

        protoBuilder.setTestsCount(task.getNumberOfTests());

        Grade gradeProto = protoBuilder.build();
        DataOutputStream dataOutput = new DataOutputStream(os);
        dataOutput.writeInt(gradeProto.getSerializedSize());
        gradeProto.writeTo(dataOutput);
        // we will continue work with os, so do not close dataOutput.
    }

    private Task getTask() throws AgentException {
        if (currentJob == null) {
View Full Code Here

Examples of co.cask.tigon.sql.io.GDATEncoder.writeTo()

          break;
      }
      index++;
    }
    if (!eof) {
      encoder.writeTo(out);
    } else {
      encoder.writeEOFRecord(out);
    }
  }
View Full Code Here

Examples of com.alibaba.citrus.service.template.TemplateEngine.writeTo()

    public void writeTo(String templateName, TemplateContext context, OutputStream ostream) throws TemplateException,
                                                                                                   IOException {
        TemplateMatchResult result = findTemplate(templateName);
        TemplateEngine engine = assertNotNull(result.getEngine(), "templateEngine");

        engine.writeTo(result.getTemplateName(), context, ostream);
    }

    /** 渲染模板,并将渲染的结果送到字符输出流中。 */
    public void writeTo(String templateName, TemplateContext context, Writer writer) throws TemplateException,
                                                                                            IOException {
View Full Code Here

Examples of com.alibaba.citrus.service.template.TemplateService.writeTo()

                    if (templateName != null) {
                        templateName = mappingRuleService.getMappedName(CONTROL_TEMPLATE, templateName);
                    }

                    if (templateName != null) {
                        templateService.writeTo(templateName, new ContextAdapter(contextForControl), rundata
                                .getResponse().getWriter());
                    }
                } finally {
                    rundata.popContext();
                }
View Full Code Here

Examples of com.alibaba.citrus.util.io.ByteArray.writeTo()

            flushBufferAdapter();

            OutputStream ostream = super.getOutputStream();
            ByteArray bytes = popByteBuffer();

            bytes.writeTo(ostream);

            log.debug("Committed buffered bytes to the Servlet output stream");
        }

        // ���chars
View Full Code Here

Examples of com.alibaba.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStream.writeTo()

        } catch ( TException e ) {
            throw new RpcException( RpcException.SERIALIZATION_EXCEPTION, e.getMessage(), e );
        }

        output.write( bytes );
        bos.writeTo( output );
        output.flush();

    }

    private void encodeResponse( Channel channel, OutputStream output, Response response )
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeTo()

        ByteArrayOutputStream os = new ByteArrayOutputStream();
        SerializeWriter out = new SerializeWriter(SerializerFeature.WriteClassName);
        // SerializeWriter out = new SerializeWriter();
        JSONSerializer serializer = new JSONSerializer(out);
        serializer.write(t);
        out.writeTo(os, "UTF-8");
        os.toByteArray();
        //System.out.println(JSON.toJSONString(t, SerializerFeature.WriteClassName, SerializerFeature.PrettyFormat));
        //System.out.println("json " + os.toByteArray().length);
    }
View Full Code Here

Examples of com.android.dx.dex.code.DalvInsnList.writeTo()

     */
    private void writeCodes(DexFile file, AnnotatedOutput out) {
        DalvInsnList insns = code.getInsns();

        try {
            insns.writeTo(out);
        } catch (RuntimeException ex) {
            throw ExceptionWithContext.withContext(ex, "...while writing " +
                    "instructions for " + ref.toHuman());
        }
    }
View Full Code Here

Examples of com.aphyr.riemann.Proto.Msg.writeTo()

                // Handle message
                final Msg response = handle(request);
               
                // Write response
                out.writeInt(response.getSerializedSize());
                response.writeTo(out);
              }
            }
          } catch (EOFException e) {
            // Socket closed.
          } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.