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:
parent
e57e73fe38
commit
ba5f686a06
@ -93,7 +93,7 @@ public class PropertySetFactory {
|
|||||||
LittleEndianInputStream leis = new LittleEndianInputStream(stream);
|
LittleEndianInputStream leis = new LittleEndianInputStream(stream);
|
||||||
int byteOrder = leis.readUShort();
|
int byteOrder = leis.readUShort();
|
||||||
int format = leis.readUShort();
|
int format = leis.readUShort();
|
||||||
int osVersion = (int)leis.readUInt();
|
/*int osVersion = (int)*/leis.readUInt();
|
||||||
byte[] clsIdBuf = new byte[ClassID.LENGTH];
|
byte[] clsIdBuf = new byte[ClassID.LENGTH];
|
||||||
leis.readFully(clsIdBuf);
|
leis.readFully(clsIdBuf);
|
||||||
int sectionCount = (int)leis.readUInt();
|
int sectionCount = (int)leis.readUInt();
|
||||||
|
@ -23,6 +23,7 @@ import static org.apache.poi.poifs.common.POIFSConstants.RAW_XML_FILE_HEADER;
|
|||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
import org.apache.poi.poifs.storage.HeaderBlockConstants;
|
import org.apache.poi.poifs.storage.HeaderBlockConstants;
|
||||||
import org.apache.poi.util.IOUtils;
|
import org.apache.poi.util.IOUtils;
|
||||||
@ -75,7 +76,7 @@ public enum FileMagic {
|
|||||||
/** PDF document */
|
/** PDF document */
|
||||||
PDF("%PDF"),
|
PDF("%PDF"),
|
||||||
/** Some different HTML documents */
|
/** 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!
|
// keep UNKNOWN always as last enum!
|
||||||
/** UNKNOWN magic */
|
/** UNKNOWN magic */
|
||||||
UNKNOWN(new byte[0]);
|
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
|
* @param stream stream to be checked for wrapping
|
||||||
* @return a mark enabled stream
|
* @return a mark enabled stream
|
||||||
|
Loading…
Reference in New Issue
Block a user