public class JavaXhtmlRenderer
extends com.uwyn.jhighlight.renderer.XhtmlRenderer
| Modifier and Type | Field and Description |
|---|---|
static HashMap |
DEFAULT_CSS |
| Constructor and Description |
|---|
JavaXhtmlRenderer() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getCssClass(int style) |
protected Map |
getDefaultCssStyles() |
protected com.uwyn.jhighlight.highlighter.ExplicitStateHighlighter |
getHighlighter() |
void |
highlight(String name,
InputStream in,
OutputStream out,
String encoding,
boolean fragment)
Transforms source code that's provided through an
InputStream to highlighted syntax in XHTML and writes it
back to an OutputStream. |
public static final HashMap DEFAULT_CSS
public void highlight(String name, InputStream in, OutputStream out, String encoding, boolean fragment) throws IOException
InputStream to highlighted syntax in XHTML and writes it
back to an OutputStream.
If the highlighting has to become a fragment, no CSS styles will be generated.
For complete documents, there's a collection of default styles that
will be included. It's possible to override these by changing the
provided jhighlight.properties file. It's best to look at
this file in the JHighlight archive and modify the styles that are
there already.
highlight in interface com.uwyn.jhighlight.renderer.Rendererhighlight in class com.uwyn.jhighlight.renderer.XhtmlRenderername - The name of the source file.in - The input stream that provides the source code that needs to
be transformed.out - The output stream to which to resulting XHTML should be
written.encoding - The encoding that will be used to read and write the
text.fragment - true if the generated XHTML should be a
fragment; or false if it should be a complete pageIOExceptionXhtmlRenderer.highlight(String, String, String, boolean)protected Map getDefaultCssStyles()
getDefaultCssStyles in class com.uwyn.jhighlight.renderer.XhtmlRendererprotected String getCssClass(int style)
getCssClass in class com.uwyn.jhighlight.renderer.XhtmlRendererprotected com.uwyn.jhighlight.highlighter.ExplicitStateHighlighter getHighlighter()
getHighlighter in class com.uwyn.jhighlight.renderer.XhtmlRendererCopyright © 2015 JBoss.org. All Rights Reserved.