Package jweblite.web.wrapper.stream

Examples of jweblite.web.wrapper.stream.JWebLiteResponseWrapperStream


      JWebLitePage reqClassInstance) {
    if (reqClassInstance == null
        || !(reqClassInstance instanceof LineWriterListener)) {
      return;
    }
    JWebLiteResponseWrapperStream respWrapperStream = respWrapper
        .getWrapperStream();
    respWrapperStream
        .setLineWriterListener((LineWriterListener) reqClassInstance);
    respWrapperStream.resetOutputStream(respWrapperStream
        .getOriginalOutputStream());
  }
View Full Code Here


    if (servletPath == null) {
      return "";
    }
    // original wrapper stream
    JWebLiteResponseWrapper respWrapper = (JWebLiteResponseWrapper) resp;
    JWebLiteResponseWrapperStream respWrapperStream = respWrapper
        .getWrapperStream();
    OutputStream originalOutputStream = respWrapperStream
        .getOriginalOutputStream();
    // proxy
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    respWrapperStream.setGZipEnabled(false);
    respWrapperStream.resetOutputStream(baos);
    req.getRequestDispatcher(servletPath).forward(req, resp);
    // revert
    respWrapperStream.setGZipEnabled(respWrapper.isGZipEnabled());
    respWrapperStream.resetOutputStream(originalOutputStream);
    return baos.toString();
  }
View Full Code Here

TOP

Related Classes of jweblite.web.wrapper.stream.JWebLiteResponseWrapperStream

Copyright © 2018 www.massapicom. 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.