public final class ZipLong
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
private long |
m_value |
| Constructor and Description |
|---|
ZipLong(byte[] buffer)
Create instance from bytes.
|
ZipLong(byte[] buffer,
int offset)
Create instance from the four bytes starting at offset.
|
ZipLong(long value)
Create instance from a number.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Override to make two instances with same value equal.
|
byte[] |
getBytes()
Get value as two bytes in big endian byte order.
|
long |
getValue()
Get value as Java int.
|
int |
hashCode()
Override to make two instances with same value equal.
|
public ZipLong(long value)
value - the valuepublic ZipLong(byte[] buffer)
buffer - the buffer to read data frompublic ZipLong(byte[] buffer,
int offset)
buffer - buffer to read data fromoffset - offset into bufferpublic byte[] getBytes()
public long getValue()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to compare againstpublic int hashCode()
hashCode in class java.lang.Object