Examples of WriterOutputStream


Examples of com.cedarsoft.io.WriterOutputStream

   * We want to be sure that everything works in the context off the APTClassLoader
   */
  public abstract static class AbstractGeneratorRunner<T extends DecisionCallback> implements Runner {
    @Override
    public void generate( @Nonnull GeneratorConfiguration configuration ) throws IOException, JClassAlreadyExistsException {
      PrintStream statusPrinter = new PrintStream( new WriterOutputStream( configuration.getLogOut() ) );

      Result result = Parser.parse( configuration.getClasspath(), configuration.getDomainSourceFiles() );

      if ( result.getClassDeclarations().isEmpty() ) {
        throw new IllegalStateException( "No class declarations found" );
View Full Code Here

Examples of com.github.dandelion.core.utils.WriterOutputStream

   */
  @Override
  public void doProcess(Reader reader, Writer writer, ProcessingContext processingContext) throws Exception {
    InputStream is = new ReaderInputStream(reader, processingContext.getContext().getConfiguration()
        .getAssetProcessorEncoding());
    OutputStream os = new WriterOutputStream(writer, processingContext.getContext().getConfiguration()
        .getAssetProcessorEncoding());
    try {
      new JSMin(is, os).jsmin();
    }
    catch (Exception e) {
      throw e;
    }
    finally {
      is.close();
      os.close();
    }
  }
View Full Code Here

Examples of com.ibm.commons.util.io.WriterOutputStream


  private static String encodeBase64(byte[] b) {
    try {
      StringWriter sw = new StringWriter();
      Base64.OutputStream b64 = new Base64.OutputStream(new WriterOutputStream(sw));

      int len = b.length;
      for( int i=0; i<len; i++) {
        int c = b[i];
        b64.write(c);
View Full Code Here

Examples of de.timefinder.core.util.WriterOutputStream

    private OutputStream writer;
    private ObjectWriting objectWriting = new ObjectWriting();

    XmlExport(DataPool pool, DataPoolSettings settings, Writer writer) {
        this(pool, settings, new WriterOutputStream(writer));
    }
View Full Code Here

Examples of org.apache.axis2.transport.base.streams.WriterOutputStream

            // This is the old behavior: just set debug to true
            session.setDebug(true);
        }
        if (ParamUtils.getOptionalParamBoolean(params, MailConstants.TRANSPORT_MAIL_DEBUG, false)) {
            // Redirect debug output to where it belongs, namely to the logs!
            session.setDebugOut(new PrintStream(new WriterOutputStream(new LogWriter(log)), true));
            // Only enable debug afterwards since the call to setDebug might already cause debug output
            session.setDebug(true);
        }
    }
View Full Code Here

Examples of org.apache.commons.io.output.WriterOutputStream

  }

  @Override
    public void writeTo(Writer writer, Syntax syntax) throws IOException,
      ModelRuntimeException, SyntaxNotSupportedException {
    WriterOutputStream stream = new WriterOutputStream(writer, StandardCharsets.UTF_8);
    writeTo(stream, syntax);
  }
View Full Code Here

Examples of org.apache.commons.io.output.WriterOutputStream

        row.addContent(123456789);
        row.addContent("A very long text that should be cut");
        row.addContent("A very long text that should not be cut");

        StringWriter writer = new StringWriter();
        PrintStream out = new PrintStream(new WriterOutputStream(writer));
        table.print(out, true);
        out.flush();
        String expected =
                "   id | Name                 |                Centered                \n" +
                "----------------------------------------------------------------------\n" +
View Full Code Here

Examples of org.apache.commons.io.output.WriterOutputStream

        table.column(new Col("2"));

        table.addRow().addContent("1", "2");

        StringWriter writer = new StringWriter();
        PrintStream out = new PrintStream(new WriterOutputStream(writer));
        table.print(out, true);
        out.flush();
        String expected =
                "1      | 2\n" +
            "----------\n" +
View Full Code Here

Examples of org.apache.commons.io.output.WriterOutputStream

        table.column(new Col("2").alignRight());

        table.addRow().addContent("quite long", "and here an even longer text");

        StringWriter writer = new StringWriter();
        PrintStream out = new PrintStream(new WriterOutputStream(writer));
        table.print(out, true);
        out.flush();
        String expected = //
                  "1     |  2\n" //
                + "----------\n" //
View Full Code Here

Examples of org.apache.commons.io.output.WriterOutputStream

        table.column(new Col("2").alignRight());

        table.addRow().addContent("quite long", "and here an even longer text");

        StringWriter writer = new StringWriter();
        PrintStream out = new PrintStream(new WriterOutputStream(writer));
        table.print(out, true);
        out.flush();
        String expected = //
                  "1     | \n" + //
                  "--------\n" + //
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.