]> source.dussan.org Git - poi.git/commitdiff
Fix typos and warnings
authorDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:21:35 +0000 (08:21 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:21:35 +0000 (08:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808509 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hpsf/PropertySetFactory.java
src/java/org/apache/poi/poifs/filesystem/FileMagic.java

index c3ced5d10616b4cdd19f1f6c62be781d2cbf31f6..44436c3b570db13844531af3280e1bf8aa194121 100644 (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();
index a4577dfed6b98809a419acb33ea51ed669616ece..c7fe7ca99c31cdf1f5ce6f15c4c0939a367457da 100644 (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