|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.excalibur.zip.ZipLong
Utility class that represents a four byte integer with conversion rules for the big endian byte order of ZIP files.
Constructor Summary | |
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. |
Method Summary | |
boolean |
equals(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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
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 bufferMethod Detail |
public byte[] getBytes()
public long getValue()
public boolean equals(Object o)
equals
in class Object
o
- the object to compare againstpublic int hashCode()
hashCode
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |