Package com.ctc.wstx.dtd
Class DTDWriter
java.lang.Object
com.ctc.wstx.dtd.DTDWriter
Simple utility class used by
when writing out
flattened external DTD subset file. Writing functionality encapsulated
here since it's specific to one mode of operation (flattening).
invalid reference
DTDReader
Note, too, that underlying IOException
s are generally wrapped
as XMLStreamException
s. This is needed to reduce amount of
work caller has to do for wrapping. It will still be possible to
unwrap these exceptions further up the call stack if need be.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
Pointer to first character in the current input buffer that has not yet been written to flatten writer.(package private) final boolean
(package private) final boolean
(package private) final boolean
(package private) int
Counter that indicates whether flattened output should be written to (non-null) mWriter; values above zero indicate output is enabled, zero and below that output is disabled.(package private) final Writer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
enableOutput
(int newStart) void
flush
(char[] buf, int upUntil) int
boolean
boolean
boolean
void
output
(char c) void
Method called when explicit output has to be done for flatten output: this is usually done when there's need to do speculative checks before it's known if some chars are output (when suppressing comments or conditional sections)void
setFlattenStart
(int ptr)
-
Field Details
-
mWriter
-
mIncludeComments
final boolean mIncludeComments -
mIncludeConditionals
final boolean mIncludeConditionals -
mIncludePEs
final boolean mIncludePEs -
mIsFlattening
int mIsFlatteningCounter that indicates whether flattened output should be written to (non-null) mWriter; values above zero indicate output is enabled, zero and below that output is disabled. Only enabled if mWriter is not null; will be temporarily disabled during processing of content that is not to be included (PE reference; or comments / conditional sections if comment/cs output is suppressed) -
mFlattenStart
int mFlattenStartPointer to first character in the current input buffer that has not yet been written to flatten writer.
-
-
Constructor Details
-
DTDWriter
-
-
Method Details
-
includeComments
public boolean includeComments() -
includeConditionals
public boolean includeConditionals() -
includeParamEntities
public boolean includeParamEntities() -
disableOutput
public void disableOutput() -
enableOutput
public void enableOutput(int newStart) -
setFlattenStart
public void setFlattenStart(int ptr) -
getFlattenStart
public int getFlattenStart() -
flush
- Throws:
XMLStreamException
-
output
Method called when explicit output has to be done for flatten output: this is usually done when there's need to do speculative checks before it's known if some chars are output (when suppressing comments or conditional sections)- Throws:
XMLStreamException
-
output
- Throws:
XMLStreamException
-