com.jcoverage.reporting.html
Class HtmlFormatHelper

java.lang.Object
  extended bycom.jcoverage.reporting.html.HtmlFormatHelper

public class HtmlFormatHelper
extends java.lang.Object


Field Summary
(package private) static org.apache.log4j.Logger logger
           
static int TAB_WIDTH
          If developers have tabs in their source code, we cannot emit them in HTML, so will convert them to N non-breaking spaces per tab, where N is this constant.
 
Constructor Summary
HtmlFormatHelper()
           
 
Method Summary
static void drainInputStream(java.io.InputStream in, java.io.PrintWriter writer)
          Since this is HTML, we'll want to encode the incoming file according to the HTML encoding we're using, so this implementation just delegates to drainReader(java.io.Reader,java.io.PrintWriter).
static void drainReader(java.io.Reader in, java.io.PrintWriter writer)
           
(package private) static java.lang.String replace(java.lang.String original, java.lang.String toFind, java.lang.String replaceWith)
           
static java.lang.String replaceCharacterEntities(java.lang.String original)
           
static java.lang.String untabify(java.lang.String original, int tabwidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger

TAB_WIDTH

public static final int TAB_WIDTH
If developers have tabs in their source code, we cannot emit them in HTML, so will convert them to N non-breaking spaces per tab, where N is this constant.

It is recommended that developers avoid using tabs for reasons of code portability.

See Also:
Constant Field Values
Constructor Detail

HtmlFormatHelper

public HtmlFormatHelper()
Method Detail

untabify

public static java.lang.String untabify(java.lang.String original,
                                        int tabwidth)

replaceCharacterEntities

public static java.lang.String replaceCharacterEntities(java.lang.String original)

replace

static java.lang.String replace(java.lang.String original,
                                java.lang.String toFind,
                                java.lang.String replaceWith)

drainInputStream

public static void drainInputStream(java.io.InputStream in,
                                    java.io.PrintWriter writer)
                             throws java.io.IOException
Since this is HTML, we'll want to encode the incoming file according to the HTML encoding we're using, so this implementation just delegates to drainReader(java.io.Reader,java.io.PrintWriter).

For now, use the platform default encoding, but this can change later.

Throws:
java.io.IOException

drainReader

public static void drainReader(java.io.Reader in,
                               java.io.PrintWriter writer)
                        throws java.io.IOException
Throws:
java.io.IOException