@NotThreadSafe
public class XmlInputStream
extends java.io.FilterInputStream
This is a slightly modified (class/method rename) from an SO answer: https://stackoverflow.com/questions/7286428/help-the-java-sax-parser-to-understand-bad-xml
| Constructor and Description |
|---|
XmlInputStream(java.io.InputStream in)
Constructs a new XML Input Stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
length()
NB: This is a Troll length (i.e.
|
int |
read()
Reads the next byte.
|
int |
read(@NotNull byte[] data,
int offset,
int length)
Reads the next length of bytes from the stream into the given byte array
at the given offset.
|
java.lang.String |
toString()
To string implementation.
|
public XmlInputStream(java.io.InputStream in)
in - the base input streampublic int length()
public int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOException - thrown when there is an problem readingpublic int read(@NotNull
@NotNull byte[] data,
int offset,
int length)
throws java.io.IOException
read in class java.io.FilterInputStreamdata - the buffer to store the data readoffset - the offset in the buffer to start writinglength - the length of data to readjava.io.IOException - thrown when there is an issue with the underlying
streampublic java.lang.String toString()
toString in class java.lang.ObjectCopyright© 2012-21 Jeremy Long. All Rights Reserved.