java.lang.Cloneablepublic final class ZipShort
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field | Description |
|---|---|---|
private int |
m_value |
| Constructor | Description |
|---|---|
ZipShort(byte[] bytes) |
Create instance from bytes.
|
ZipShort(byte[] bytes,
int offset) |
Create instance from the two bytes starting at offset.
|
ZipShort(int value) |
Create instance from a number.
|
| Modifier and Type | Method | 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.
|
int |
getValue() |
Get value as Java int.
|
int |
hashCode() |
Override to make two instances with same value equal.
|
public ZipShort(int value)
value - Description of Parameterpublic ZipShort(byte[] bytes)
bytes - Description of Parameterpublic ZipShort(byte[] bytes,
int offset)
bytes - Description of Parameteroffset - Description of Parameterpublic byte[] getBytes()
public int getValue()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Description of Parameterpublic int hashCode()
hashCode in class java.lang.Object