Serializable, DataStructurepublic class SessionTag extends SimpleDataStructure
| Modifier and Type | Field | Description |
|---|---|---|
static int |
BYTE_LENGTH |
_data| Constructor | Description |
|---|---|
SessionTag() |
|
SessionTag(boolean create) |
|
SessionTag(byte[] val) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
hashCode() |
SessionTags are generated both locally and by peers, in quantity,
and are used as keys in several datastructures (see TransientSessionKeyManager),
so we use a secure hashCode function.
|
int |
length() |
The legal length of the byte array in this data structure
|
void |
readBytes(InputStream in) |
Sets the data.
|
void |
setData(byte[] data) |
Sets the data.
|
readclone, finalize, getClass, notify, notifyAll, wait, wait, waitcalculateHash, equals, fromBase64, fromByteArray, getData, toBase64, toByteArray, toString, writeBytespublic static final int BYTE_LENGTH
public SessionTag()
public SessionTag(boolean create)
create - if true, instantiate the data array and fill it with random data.public SessionTag(byte[] val)
public int length()
SimpleDataStructurelength in class SimpleDataStructurepublic void setData(byte[] data)
SimpleDataStructuresetData in class SimpleDataStructuredata - of correct length, or nullpublic void readBytes(InputStream in) throws DataFormatException, IOException
SimpleDataStructurereadBytes in interface DataStructurereadBytes in class SimpleDataStructurein - the stream to readDataFormatException - if the data is improperly formattedIOException - if there was a problem reading the streampublic int hashCode()
hashCode in class SimpleDataStructure