Package org.custommonkey.xmlunit
Class DoctypeSupport
java.lang.Object
org.custommonkey.xmlunit.DoctypeSupport
Contains some common code for DoctypeReader and DoctypeInputStream.
When used with DoctypeInputStream it assumes that the whole DOCTYPE declaration consists of US-ASCII characters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
(package private) static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DoctypeSupport.Readable
private DoctypeSupport.Readable
private DoctypeSupport.Readable
(package private) static final String
(package private) static final String
private static final int[]
(package private) static final String
private boolean
private final DoctypeSupport.Readable
(package private) static final String
-
Constructor Summary
ConstructorsConstructorDescriptionDoctypeSupport
(String name, String systemId, DoctypeSupport.Readable original, boolean characters, String encoding) Encapsulates a DOCTYPE declaration for the given name and system id. -
Method Summary
-
Field Details
-
DOCTYPE_OPEN_DECL
- See Also:
-
DOCTYPE_CLOSE_DECL
- See Also:
-
DOCTYPE
- See Also:
-
SYSTEM
- See Also:
-
DOCTYPE_INTS
private static final int[] DOCTYPE_INTS -
hasSplit
private boolean hasSplit -
original
-
decl
-
beforeDoctype
-
afterDoctype
-
-
Constructor Details
-
DoctypeSupport
DoctypeSupport(String name, String systemId, DoctypeSupport.Readable original, boolean characters, String encoding) Encapsulates a DOCTYPE declaration for the given name and system id.
-
-
Method Details
-
read
Reads the next character from the declaration.- Returns:
- -1 if the end of the declaration has been reached.
- Throws:
IOException
-
split
Reads enough of the original Readable to know where to place the declaration. Fills beforeDecl and afterDecl from the data read ahead. Swallows the original DOCTYPE if there is one.- Throws:
IOException
-
readUntilCloseCharIsReached
- Throws:
IOException
-