|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.compress.archivers.cpio.CpioUtil
class CpioUtil
Package private utility class for Cpio
Constructor Summary | |
---|---|
CpioUtil()
|
Method Summary | |
---|---|
(package private) static long |
byteArray2long(byte[] number,
boolean swapHalfWord)
Converts a byte array to a long. |
(package private) static byte[] |
long2byteArray(long number,
int length,
boolean swapHalfWord)
Converts a long number to a byte array Halfwords can be swapped by setting swapHalfWord=true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
CpioUtil()
Method Detail |
---|
static long byteArray2long(byte[] number, boolean swapHalfWord)
number
- An array of bytes containing a numberswapHalfWord
- Swap halfwords ([0][1][2][3]->[1][0][3][2])
java.lang.UnsupportedOperationException
- if number length is not a multiple of 2static byte[] long2byteArray(long number, int length, boolean swapHalfWord)
number
- the input long number to be convertedlength
- The length of the returned arrayswapHalfWord
- Swap halfwords ([0][1][2][3]->[1][0][3][2])
java.lang.UnsupportedOperationException
- if the length is not a positive multiple of two
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |