|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.data.ByteArray
public class ByteArray
Wrap up an array of bytes so that they can be compared and placed in hashes, maps, and the like.
| Constructor Summary | |
|---|---|
ByteArray()
|
|
ByteArray(byte[] data)
Sets valid |
|
ByteArray(byte[] data,
int offset,
int length)
|
|
| Method Summary | |
|---|---|
int |
compareTo(Object obj)
|
boolean |
equals(Object o)
|
byte[] |
getData()
|
int |
getOffset()
|
int |
getValid()
Count how many of the bytes in the array are 'valid'. |
int |
hashCode()
|
void |
setData(byte[] data)
Warning, does not set valid |
void |
setOffset(int offset)
|
void |
setValid(int valid)
|
String |
toBase64()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArray()
public ByteArray(byte[] data)
public ByteArray(byte[] data,
int offset,
int length)
| Method Detail |
|---|
public byte[] getData()
public void setData(byte[] data)
public int getValid()
public void setValid(int valid)
public int getOffset()
public void setOffset(int offset)
public final boolean equals(Object o)
equals in class Objectpublic final int compareTo(Object obj)
compareTo in interface Comparablepublic final int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic final String toBase64()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||