Examples of VfsStream


Examples of com.caucho.vfs.VfsStream

      // _conn.setVirtualHost(_virtualHost);

      _request = new HttpRequest(_resin.getServer(), _conn);
      _request.init();

      _vfsStream = new VfsStream(null, null);

      // _conn.setSecure(_isSecure);

      try {
        _localAddress = InetAddress.getByName("127.0.0.1");
View Full Code Here

Examples of com.caucho.vfs.VfsStream

    _virtualHost = virtualHost;
  }

  public void setStream(InputStream is, OutputStream os)
  {
    VfsStream _vfsStream = new VfsStream(is, os);
    getWriteStream().init(_vfsStream);
    getReadStream().init(_vfsStream, getWriteStream());
   
    _isKeepalive = true;
  }
View Full Code Here

Examples of com.caucho.vfs.VfsStream

      if (contentType != null
          && contentType.startsWith("multipart/form-data")) {

        String boundary = getBoundary(contentType);

        ReadStream rs = new ReadStream(new VfsStream(is, null));

        if (boundary == null) {
          env.warning(L.l("multipart/form-data POST is missing boundary"));
         
          return;
View Full Code Here

Examples of com.caucho.vfs.VfsStream

    StringValue inputData = env.getInputData();
   
    if (inputData == null)
      inputData = env.getEmptyString();
   
    init(new ReadStream(new VfsStream(inputData.toInputStream(), null)));
  }
View Full Code Here

Examples of com.caucho.vfs.VfsStream

    _env = env;
    _in = in;
   
    env.addCleanup(this);

    init(new ReadStream(new VfsStream(in, null)));
  }
View Full Code Here

Examples of com.caucho.vfs.VfsStream

    _out = out;

    env.addCleanup(this);

    init(new ReadStream(new VfsStream(in, null)));
  }
View Full Code Here

Examples of com.caucho.vfs.VfsStream

  {
    _env = env;

    _env.addCleanup(this);

    _os = new WriteStream(new VfsStream(null, out));
  }
View Full Code Here

Examples of com.caucho.vfs.VfsStream

         
              StringWriter writer = new StringWriter(new CharBuffer(1024));
              writer.openWrite();
             
              ByteArrayInputStream bais = new ByteArrayInputStream(templateAsString.getBytes());
              VfsStream stream = new VfsStream(bais, null);       
              QuercusPage page = quercus.parse(new ReadStream(stream));
             
              WriteStream ws = new WriteStream(writer);
             
              Env env = quercus.createEnv(page, ws, deliveryContext.getHttpServletRequest(), deliveryContext.getHttpServletResponse());
              env.start();
                         
              Value value = page.executeTop(env);
              ws.flush();

              String output = ((StringWriter)ws.getSource()).getString();           
             
              Object returnObject = value.toJavaObject();
 
              //logger.info("output:" + output);
          pw.println(output);
        }
        catch (Throwable e)
        {
          e.printStackTrace();
      }
    }
      else if(scriptController != null)
      {
        scriptController.getRequest().setAttribute("org.infoglue.cms.deliver.scriptLogic", scriptController);
        scriptController.getRequest().setAttribute("org.infoglue.cms.deliver.portalLogic", portletController);
        scriptController.getRequest().setAttribute("model", model);
        try
        {
          QuercusContext quercus = new QuercusContext();
          quercus.setServletContext(scriptController.getRequest().getSession().getServletContext());
          Path pwd = new FilePath(CmsPropertyHandler.getContextRootPath());
          quercus.setPwd(pwd);
          if (! Alarm.isTest() && ! quercus.isResin()) {
            Vfs.setPwd(pwd);
            WorkDir.setLocalWorkDir(pwd.lookup("WEB-INF/work"));
          }

          quercus.init();
          quercus.start();
         
              StringWriter writer = new StringWriter(new CharBuffer(1024));
              writer.openWrite();
             
              ByteArrayInputStream bais = new ByteArrayInputStream(templateAsString.getBytes());
              VfsStream stream = new VfsStream(bais, null);       
              QuercusPage page = quercus.parse(new ReadStream(stream));
             
              WriteStream ws = new WriteStream(writer);
             
              Env env = quercus.createEnv(page, ws, scriptController.getRequest(), scriptController.getResponse());
View Full Code Here

Examples of com.caucho.vfs.VfsStream

   
    _env.addCleanup(this);

    _process = process;

    init(new ReadStream(new VfsStream(_process.getInputStream(), null)));

    _process.getOutputStream().close();
  }
View Full Code Here

Examples of com.caucho.vfs.VfsStream

    _env = env;
   
    if (is instanceof ReadStream)
      init((ReadStream) is);
    else if (is != null)
      init(new ReadStream(new VfsStream(is, null)));
  }
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.