/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
BufferIterator it = HeapBufferIterator.iterator(eocd, 0, eocd.length, ByteOrder.LITTLE_ENDIAN); int diskNumber = it.readShort() & 0xffff; int diskWithCentralDir = it.readShort() & 0xffff;
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
ZipEntry(byte[] cdeHdrBuf, InputStream cdStream) throws IOException { Streams.readFully(cdStream, cdeHdrBuf, 0, cdeHdrBuf.length); BufferIterator it = HeapBufferIterator.iterator(cdeHdrBuf, 0, cdeHdrBuf.length, ByteOrder.LITTLE_ENDIAN);
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
/** * Returns a new iterator over {@code buffer}, starting at {@code offset} and continuing for * {@code byteCount} bytes. Items larger than a byte are interpreted using the given byte order. */ public static BufferIterator iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { return new HeapBufferIterator(buffer, offset, byteCount, order); } }
private TimeZone makeTimeZone(String id, boolean clone) throws IOException { // Check the aliases first String realId = deprecatedAliases.get(id); if (realId != null) { return makeTimeZone(realId, clone); } // Work out where in the big data file this time zone is. int index = Arrays.binarySearch(ids, id); if (index < 0) { return null; } ZoneInfo zoneInfo = zoneInfos[index]; if (zoneInfo != null) { return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; } byte[] bytes = IoUtils.readFileAsByteArray(ZONE_DIRECTORY_NAME + id); BufferIterator it = HeapBufferIterator.iterator(bytes, 0, bytes.length, ByteOrder.BIG_ENDIAN); zoneInfo = (ZoneInfo) ZoneInfo.makeTimeZone(id, it); zoneInfos[index] = zoneInfo; return clone ? (TimeZone) zoneInfo.clone() : zoneInfo; }
BufferIterator it = HeapBufferIterator.iterator(eocd, 0, eocd.length, ByteOrder.LITTLE_ENDIAN); int diskNumber = it.readShort() & 0xffff; int diskWithCentralDir = it.readShort() & 0xffff;
BufferIterator it = HeapBufferIterator.iterator(eocd, 0, eocd.length, ByteOrder.LITTLE_ENDIAN); int diskNumber = it.readShort() & 0xffff; int diskWithCentralDir = it.readShort() & 0xffff;
BufferIterator it = HeapBufferIterator.iterator(eocd, 0, eocd.length, ByteOrder.LITTLE_ENDIAN); int diskNumber = it.readShort() & 0xffff; int diskWithCentralDir = it.readShort() & 0xffff;