LittleEndianInputStream leis = new LittleEndianInputStream(stream);
int byteOrder = leis.readUShort();
int format = leis.readUShort();
- int osVersion = (int)leis.readUInt();
+ /*int osVersion = (int)*/leis.readUInt();
byte[] clsIdBuf = new byte[ClassID.LENGTH];
leis.readFully(clsIdBuf);
int sectionCount = (int)leis.readUInt();
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.Charset;
import org.apache.poi.poifs.storage.HeaderBlockConstants;
import org.apache.poi.util.IOUtils;
/** PDF document */
PDF("%PDF"),
/** Some different HTML documents */
- HTML("<!DOCTYP".getBytes(), "<html".getBytes()),
+ HTML("<!DOCTYP".getBytes(Charset.forName("UTF-8")), "<html".getBytes(Charset.forName("UTF-8"))),
// keep UNKNOWN always as last enum!
/** UNKNOWN magic */
UNKNOWN(new byte[0]);
/**
- * Checks if an {@link InputStream} can be reseted (i.e. used for checking the header magic) and wraps it if not
+ * Checks if an {@link InputStream} can be reset (i.e. used for checking the header magic) and wraps it if not
*
* @param stream stream to be checked for wrapping
* @return a mark enabled stream