Fix typos and warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2017-09-16 08:21:35 +00:00
parent e57e73fe38
commit ba5f686a06
2 changed files with 4 additions and 3 deletions

View File

@ -93,7 +93,7 @@ public class PropertySetFactory {
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();

View File

@ -23,6 +23,7 @@ import static org.apache.poi.poifs.common.POIFSConstants.RAW_XML_FILE_HEADER;
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;
@ -75,7 +76,7 @@ public enum FileMagic {
/** 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]);
@ -141,7 +142,7 @@ public enum FileMagic {
/**
* 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