Package org.structr.rest.serialization

Examples of org.structr.rest.serialization.StreamingHtmlWriter


      String accept = request.getHeader("Accept");

      if (accept != null && accept.contains("text/html")) {

        final StreamingHtmlWriter htmlStreamer = new StreamingHtmlWriter(this.propertyView, indentJson, config.getOutputNestingDepth());

        // isolate write output
        try (final Tx tx = app.tx()) {

          response.setContentType("text/html; charset=utf-8");

          try (final Writer writer = response.getWriter()) {

            htmlStreamer.stream(securityContext, writer, result, baseUrl);
            writer.append("\n");    // useful newline
          }

          tx.success();
        }
View Full Code Here

TOP

Related Classes of org.structr.rest.serialization.StreamingHtmlWriter

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.