Index: LittleEndian.java
===================================================================
RCS file:
/home/cvspublic/jakarta-poi/src/java/org/apache/poi/util/LittleEndian.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 LittleEndian.java
--- LittleEndian.java 31 Jan 2002 02:23:46 -0000 1.1.1.1
+++ LittleEndian.java 19 Mar 2002 04:31:20 -0000
@@ -80,6 +80,34 @@
}
/**
+ * get the unsigned value of a byte.
+ *
+ * @param data the byte array.
+ * @param offset a starting offset into the byte array.
+ *
+ * @return the unsigned value of the byte as a 32 bit integer
+ *
+ * @exception ArrayIndexOutOfBoundsException may be thrown
+ */
+ public static int getUnsignedByte(final byte [] data, final int offset)
+ {
+ return ( int ) getNumber(data, offset, BYTE_SIZE);
+ }
+
+ /**
+ * get the unsigned value of a byte.
+ *
+ * @param data the byte array
+ *
+ * @return the unsigned value of the byte as a 32 bit integer
+ *
+ * @exception ArrayIndexOutOfBoundsException may be thrown
+ */
+ public static int getUnsignedByte(final byte [] data)
+ {
+ return getUnsignedByte(data, 0);
+ }
+ /**
* get a short value from a byte array
*
* @param data the byte array