|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.joost.emitter.StxEmitterBase
net.sf.joost.emitter.StreamEmitter
Base class for emitter classes that produce a character stream.
| Field Summary | |
protected CharsetEncoder |
charsetEncoder
Encoder for the chosen encoding |
protected String |
encoding
The used output encoding |
private static String |
HTML_METHOD
Joost's HTML extension output method |
private static org.apache.commons.logging.Log |
log
|
protected Writer |
writer
Writer for the resulting text |
| Fields inherited from class net.sf.joost.emitter.StxEmitterBase |
|
| Fields inherited from interface net.sf.joost.Constants |
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
| Constructor Summary | |
StreamEmitter(Writer writer,
String encoding)
|
|
| Method Summary | |
void |
comment(char[] ch,
int start,
int length)
Does nothing |
void |
endCDATA()
Does nothing |
void |
endDTD()
Does nothing |
void |
endEntity(String name)
Won't be called |
void |
endPrefixMapping(String prefix)
Does nothing |
void |
ignorableWhitespace(char[] p0,
int p1,
int p2)
Won't be called |
static StreamEmitter |
newEmitter(OutputStream out,
Properties outputProperties)
Creates an emitter using a given OutputStream and a set
of output properties. |
static StreamEmitter |
newEmitter(String filename,
Properties outputProperties)
Creates an emitter that writes to a given file, using a set of output properties. |
static StreamEmitter |
newEmitter(Writer writer,
String encoding,
Properties outputProperties)
Creates an emitter using a given Writer, an output
encoding and a set of output properties. |
static StreamEmitter |
newXMLEmitter(Writer writer)
Creates an XML emitter using a given Writer and the default
output encoding (Constants.DEFAULT_ENCODING). |
void |
processingInstruction(String target,
String data)
Does nothing |
void |
setDocumentLocator(Locator locator)
Does nothing |
void |
setOmitXmlDeclaration(boolean flag)
Defines whether the XML declaration should be written |
void |
skippedEntity(String value)
Won't be called |
void |
startCDATA()
Does nothing |
void |
startDTD(String name,
String publicId,
String systemId)
Does nothing |
void |
startEntity(String name)
Won't be called |
void |
startPrefixMapping(String prefix,
String uri)
Does nothing |
| Methods inherited from class net.sf.joost.emitter.StxEmitterBase |
getSystemId, setSystemId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, startDocument, startElement |
| Field Detail |
private static org.apache.commons.logging.Log log
private static String HTML_METHOD
protected Writer writer
protected String encoding
protected CharsetEncoder charsetEncoder
encoding
| Constructor Detail |
public StreamEmitter(Writer writer,
String encoding)
| Method Detail |
public static StreamEmitter newEmitter(Writer writer,
String encoding,
Properties outputProperties)
Writer, an output
encoding and a set of output properties. The value of the
OutputKeys.METHOD property determines the returned
emitter object.
writer - A Writer for receiving the output.encoding - the encoding used in the writer resp. that should
be used for the encoding declarationoutputProperties - The set of output properties to be used.
public static StreamEmitter newEmitter(OutputStream out,
Properties outputProperties)
throws IOException
OutputStream and a set
of output properties. The value of the OutputKeys.ENCODING
property defines the encoding for to used. The value of the
OutputKeys.METHOD property determines the returned
emitter object.
out - An OutputStream for receiving the output.outputProperties - The set of output properties to be used.
IOException - When an error occurs while accessing
OutputStream.public static StreamEmitter newXMLEmitter(Writer writer)
Writer and the default
output encoding (Constants.DEFAULT_ENCODING).
writer - A Writer for receiving the output.
public static StreamEmitter newEmitter(String filename,
Properties outputProperties)
throws IOException
OutputKeys.ENCODING
property defines the encoding for to used. The value of the
OutputKeys.METHOD property determines the returned
emitter object.
filename - The name of the output file.outputProperties - The set of output properties to be used.
IOException - When an error occurs while opening the file.public void setOmitXmlDeclaration(boolean flag)
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix)
endPrefixMapping in interface ContentHandler
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void skippedEntity(String value)
skippedEntity in interface ContentHandler
public void ignorableWhitespace(char[] p0,
int p1,
int p2)
ignorableWhitespace in interface ContentHandlerpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandler
public void startDTD(String name,
String publicId,
String systemId)
startDTD in interface LexicalHandlerpublic void endDTD()
endDTD in interface LexicalHandlerpublic void startEntity(String name)
startEntity in interface LexicalHandlerpublic void endEntity(String name)
endEntity in interface LexicalHandler
public void startCDATA()
throws SAXException
startCDATA in interface LexicalHandlerSAXException
public void endCDATA()
throws SAXException
endCDATA in interface LexicalHandlerSAXException
public void comment(char[] ch,
int start,
int length)
throws SAXException
comment in interface LexicalHandlerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||