Examples of WriteStream


Examples of com.caucho.vfs.WriteStream

                  HttpServletRequest request,
                  HttpServletResponse response,
                  ServletContext application)
    throws IOException
  {
    WriteStream logStream = getLogStream();

    if (logStream == null)
      return;

    Throwable t = e;
    while (t != null) {
      e = t;
       
      if (e instanceof ServletException)
        t = ((ServletException) e).getRootCause();
      else if (e instanceof ExceptionWrapper)
        t = ((ExceptionWrapper) e).getRootCause();
      else
        t = null;
    }

    CharBuffer cb = CharBuffer.allocate();

    QDate.formatLocal(cb, Alarm.getCurrentTime(), "[%Y/%m/%d %H:%M:%S] ");

    cb.append(message);

    logStream.log(cb.close());

    if (e != null && ! (e instanceof CompileException))
      logStream.log(e);

    logStream.flush();
  }
View Full Code Here

Examples of com.dotcms.repackage.com.caucho.vfs.WriteStream

    PHPEvalWrapper wrapper = new PHPEvalWrapper();
    StringWriter sw = new StringWriter();
    WriterStreamImpl writerImpl = new WriterStreamImpl();
        writerImpl.setWriter(sw);

    WriteStream writeStream = new WriteStream(writerImpl);
   
    Env env = php.createEnv(page, writeStream, null, null);
    env.start();
    populateEnv(env);
    page.executeTop(env);
    Value v = qp.execute(env);
   
    List<Function> funcs = qp.getFunctionList();
    if(funcs != null){
      wrapper.setFunctions(funcs);
    }
 
    PrintWriter pw = writeStream.getPrintWriter();
    pw.flush();
   
    wrapper.setValue(v);
    wrapper.setOut(sw.toString());
    return wrapper;
View Full Code Here

Examples of io.vertx.core.streams.WriteStream

      if (arr.succeeded()) {
        ReadStream rs = arr.result();
        //Open file for writing
        vertx.fileSystem().open(testDir + pathSep + fileName2, new OpenOptions(), ar -> {
          if (ar.succeeded()) {
            WriteStream ws = ar.result();
            Pump p = Pump.pump(rs, ws);
            p.start();
            rs.endHandler(v -> {
              arr.result().close(car -> {
                if (car.failed()) {
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.