Examples of JWebLiteResponseWrapperStream


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

Examples of jweblite.web.wrapper.stream.JWebLiteResponseWrapperStream

    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
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.