You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2017/09/16 08:21:35 UTC
svn commit: r1808509 - in /poi/trunk/src/java/org/apache/poi:
hpsf/PropertySetFactory.java poifs/filesystem/FileMagic.java
Author: centic
Date: Sat Sep 16 08:21:35 2017
New Revision: 1808509
URL: http://svn.apache.org/viewvc?rev=1808509&view=rev
Log:
Fix typos and warnings
Modified:
poi/trunk/src/java/org/apache/poi/hpsf/PropertySetFactory.java
poi/trunk/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
Modified: poi/trunk/src/java/org/apache/poi/hpsf/PropertySetFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/PropertySetFactory.java?rev=1808509&r1=1808508&r2=1808509&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/PropertySetFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/PropertySetFactory.java Sat Sep 16 08:21:35 2017
@@ -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();
Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/FileMagic.java?rev=1808509&r1=1808508&r2=1808509&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/FileMagic.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/FileMagic.java Sat Sep 16 08:21:35 2017
@@ -23,6 +23,7 @@ import static org.apache.poi.poifs.commo
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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org