Package hudson.plugins.nunit
Class InvalidXmlStreamReader
java.lang.Object
java.io.Reader
java.io.FilterReader
hudson.plugins.nunit.InvalidXmlStreamReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
Provides similar functionality to org.apache.commons.io.input.XmlStreamReader plus replacing invalid xml characters.
-
Field Summary
Fields inherited from class java.io.FilterReader
in
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidXmlStreamReader
(InputStream in, char replacement) Constructs a new reader. -
Method Summary
Methods inherited from class java.io.FilterReader
close, mark, markSupported, ready, reset, skip
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
InvalidXmlStreamReader
Constructs a new reader.- Parameters:
in
- the underlying stream.replacement
- the replacement character for invalid xml characters.- Throws:
IOException
-
-
Method Details
-
read
Invokes the in'sread()
method, detecting and skipping invalid xml characters- Overrides:
read
in classFilterReader
- Returns:
- the character read (excluding invalid xml characters) or -1 if the end of stream
- Throws:
IOException
- if an I/O error occurs
-
read
Invokes the in'sread(byte[], int, int)
method, detecting and skipping invalid xml.- Overrides:
read
in classFilterReader
- Parameters:
cbuf
- the buffer to read the characters intooff
- The start offsetlen
- The maximum number of characters to read- Returns:
- the number of characters read or -1 if the end of stream
- Throws:
IOException
- if an I/O error occurs
-