jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java
changeset 31819 ba7cde5a611a
parent 29226 b675016fabfd
child 31820 f8214072b376
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java	Wed Jul 22 11:08:35 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java	Wed Jul 22 21:43:33 2015 +0000
@@ -144,4 +144,13 @@
     public static final long get64(byte b[], int off) {
         return get32(b, off) | (get32(b, off+4) << 32);
     }
+
+    /**
+     * Fetches signed 32-bit value from byte array at specified offset.
+     * The bytes are assumed to be in Intel (little-endian) byte order.
+     *
+     */
+    public static final int get32S(byte b[], int off) {
+        return (get16(b, off) | (get16(b, off+2) << 16));
+    }
 }