DataStructurepublic class SessionConfig extends DataStructureImpl
| コンストラクタ | 説明 |
|---|---|
SessionConfig() |
|
SessionConfig(Destination dest) |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
boolean |
equals(java.lang.Object object) |
|
java.util.Date |
getCreationDate() |
Determine when this session was authorized by the destination (so we can
prevent replay attacks)
|
Destination |
getDestination() |
Retrieve the destination for which this session is supposed to connect
|
java.util.Properties |
getOptions() |
Retrieve any configuration options for the session
|
Signature |
getSignature() |
|
int |
hashCode() |
|
void |
readBytes(java.io.InputStream rawConfig) |
Load up the current object with data from the given stream.
|
void |
setCreationDate(java.util.Date date) |
|
void |
setOptions(java.util.Properties options) |
Configure the session with the given options;
keys and values 255 bytes (not chars) max each
Defaults in SessionConfig options are, in general, NOT honored.
|
void |
setSignature(Signature sig) |
|
void |
signSessionConfig(SigningPrivateKey signingKey) |
Sign the structure using the supplied private key
|
boolean |
tooOld() |
Misnamed, could be too old or too far in the future.
|
java.lang.String |
toString() |
|
boolean |
verifySignature() |
Verify that the signature matches the destination's signing public key.
|
void |
writeBytes(java.io.OutputStream out) |
Write out the data structure to the stream, using the format defined in the
I2P data structure specification.
|
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArraypublic SessionConfig()
public SessionConfig(Destination dest)
public Destination getDestination()
public java.util.Date getCreationDate()
public void setCreationDate(java.util.Date date)
public java.util.Properties getOptions()
public void setOptions(java.util.Properties options)
options - Properties for this sessionpublic Signature getSignature()
public void setSignature(Signature sig)
public void signSessionConfig(SigningPrivateKey signingKey) throws DataFormatException
signingKey - SigningPrivateKey to sign withDataFormatExceptionpublic boolean verifySignature()
public boolean tooOld()
public void readBytes(java.io.InputStream rawConfig)
throws DataFormatException,
java.io.IOException
DataStructurerawConfig - stream to read fromDataFormatException - if the data is improperly formattedjava.io.IOException - if there was a problem reading the streampublic void writeBytes(java.io.OutputStream out)
throws DataFormatException,
java.io.IOException
DataStructureout - stream to write toDataFormatException - if the data was incomplete or not yet ready to be writtenjava.io.IOException - if there was a problem writing to the streampublic boolean equals(java.lang.Object object)
equals クラス内 java.lang.Objectpublic int hashCode()
hashCode クラス内 java.lang.Objectpublic java.lang.String toString()
toString クラス内 java.lang.Object