< prev index next >
src/java.base/share/classes/java/util/zip/ZipUtils.java
Print this page
*** 170,205 ****
/**
* Fetches unsigned 16-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
! public static final int get16(byte b[], int off) {
return (b[off] & 0xff) | ((b[off + 1] & 0xff) << 8);
}
/**
* Fetches unsigned 32-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
! public static final long get32(byte b[], int off) {
return (get16(b, off) | ((long)get16(b, off+2) << 16)) & 0xffffffffL;
}
/**
* Fetches signed 64-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
! 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));
}
// fields access methods
static final int CH(byte[] b, int n) {
--- 170,205 ----
/**
* Fetches unsigned 16-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
! public static final int get16(byte[] b, int off) {
return (b[off] & 0xff) | ((b[off + 1] & 0xff) << 8);
}
/**
* Fetches unsigned 32-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
! public static final long get32(byte[] b, int off) {
return (get16(b, off) | ((long)get16(b, off+2) << 16)) & 0xffffffffL;
}
/**
* Fetches signed 64-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
! 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));
}
// fields access methods
static final int CH(byte[] b, int n) {
< prev index next >