From 8789e744398e32ac397dbfc93ab3c5b6f6bcb54d Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sun, 8 Jul 2012 18:50:11 +0000 Subject: Start on the code to process properties, and wire it up. No properties reading code exists yet git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1358813 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/util/LittleEndian.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/java/org') diff --git a/src/java/org/apache/poi/util/LittleEndian.java b/src/java/org/apache/poi/util/LittleEndian.java index c07c4beb30..6ceb12a4a1 100644 --- a/src/java/org/apache/poi/util/LittleEndian.java +++ b/src/java/org/apache/poi/util/LittleEndian.java @@ -724,6 +724,24 @@ public class LittleEndian implements LittleEndianConsts } return ( ch4 << 24 ) + ( ch3 << 16 ) + ( ch2 << 8 ) + ( ch1 << 0 ); } + + /** + * get an unsigned int value from an InputStream + * + * @param stream + * the InputStream from which the int is to be read + * @return the unsigned int (32-bit) value + * @exception IOException + * will be propagated back to the caller + * @exception BufferUnderrunException + * if the stream cannot provide enough bytes + */ + public static long readUInt( InputStream stream ) throws IOException, + BufferUnderrunException + { + long retNum = readInt(stream); + return retNum & 0x00FFFFFFFFl; + } /** * get a long value from an InputStream -- cgit v1.2.3