org.apache.poi.xssf.util
Class EvilUnclosedBRFixingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.poi.xssf.util.EvilUnclosedBRFixingInputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
public class EvilUnclosedBRFixingInputStream extends java.io.InputStreamThis is a seriously sick fix for the fact that some .xlsx files contain raw bits of HTML, without being escaped or properly turned into XML. The result is that they contain things like >br<, which breaks the XML parsing. This very sick InputStream wrapper attempts to spot these go past, and fix them. Only works for UTF-8 and US-ASCII based streams! It should only be used where experience shows the problem can occur...
-
-
Constructor Summary
Constructors Constructor and Description EvilUnclosedBRFixingInputStream(java.io.InputStream source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intread()Warning - doesn't fix!intread(byte[] b)intread(byte[] b, int off, int len)
-
-
-
Constructor Detail
-
EvilUnclosedBRFixingInputStream
public EvilUnclosedBRFixingInputStream(java.io.InputStream source)
-
-
Method Detail
-
read
public int read() throws java.io.IOExceptionWarning - doesn't fix!- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG