| |
|
| java.lang.Object org.apache.tools.zip.ZipLong
ZipLong | final public class ZipLong implements Cloneable(Code) | | Utility class that represents a four byte integer with conversion
rules for the big endian byte order of ZIP files.
|
Constructor Summary | |
public | ZipLong(long value) Create instance from a number. | public | ZipLong(byte[] bytes) Create instance from bytes. | public | ZipLong(byte[] bytes, int offset) Create instance from the four bytes starting at offset. |
Method Summary | |
public boolean | equals(Object o) Override to make two instances with same value equal. | public byte[] | getBytes() Get value as four bytes in big endian byte order. | public static byte[] | getBytes(long value) Get value as four bytes in big endian byte order. | public long | getValue() Get value as Java long. | public static long | getValue(byte[] bytes, int offset) | public static long | getValue(byte[] bytes) | public int | hashCode() Override to make two instances with same value equal. |
ZipLong | public ZipLong(long value)(Code) | | Create instance from a number.
Parameters: value - the long to store as a ZipLong since: 1.1 |
ZipLong | public ZipLong(byte[] bytes)(Code) | | Create instance from bytes.
Parameters: bytes - the bytes to store as a ZipLong since: 1.1 |
ZipLong | public ZipLong(byte[] bytes, int offset)(Code) | | Create instance from the four bytes starting at offset.
Parameters: bytes - the bytes to store as a ZipLong Parameters: offset - the offset to start since: 1.1 |
equals | public boolean equals(Object o)(Code) | | Override to make two instances with same value equal.
Parameters: o - an object to compare true if the objects are equal since: 1.1 |
getBytes | public byte[] getBytes()(Code) | | Get value as four bytes in big endian byte order.
since: 1.1 value as four bytes in big endian order |
getBytes | public static byte[] getBytes(long value)(Code) | | Get value as four bytes in big endian byte order.
Parameters: value - the value to convert value as four bytes in big endian byte order |
getValue | public long getValue()(Code) | | Get value as Java long.
since: 1.1 value as a long |
getValue | public static long getValue(byte[] bytes, int offset)(Code) | | Helper method to get the value as a Java long from four bytes starting at given array offset
Parameters: bytes - the array of bytes Parameters: offset - the offset to start the correspondanding Java long value |
getValue | public static long getValue(byte[] bytes)(Code) | | Helper method to get the value as a Java long from a four-byte array
Parameters: bytes - the array of bytes the correspondanding Java long value |
hashCode | public int hashCode()(Code) | | Override to make two instances with same value equal.
the value stored in the ZipLong since: 1.1 |
|
|
|