DataStructure
public class SessionTag extends SimpleDataStructure
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
BYTE_LENGTH |
_data
コンストラクタ | 説明 |
---|---|
SessionTag() |
|
SessionTag(boolean create) |
|
SessionTag(byte[] val) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
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(java.io.InputStream in) |
Sets the data.
|
void |
setData(byte[] data) |
Sets the data.
|
read
calculateHash, equals, fromBase64, fromByteArray, getData, toBase64, toByteArray, toString, writeBytes
public 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()
SimpleDataStructure
length
クラス内 SimpleDataStructure
public void setData(byte[] data)
SimpleDataStructure
setData
クラス内 SimpleDataStructure
data
- of correct length, or nullpublic void readBytes(java.io.InputStream in) throws DataFormatException, java.io.IOException
SimpleDataStructure
readBytes
インタフェース内 DataStructure
readBytes
クラス内 SimpleDataStructure
in
- the stream to readDataFormatException
- if the data is improperly formattedjava.io.IOException
- if there was a problem reading the streampublic int hashCode()
hashCode
クラス内 SimpleDataStructure