## net.i2p.crypto
Class PersistentSessionKeyManager

    java.lang.Object
      net.i2p.crypto.SessionKeyManager
          net.i2p.crypto.TransientSessionKeyManager
              net.i2p.crypto.PersistentSessionKeyManager

    public class PersistentSessionKeyManager

extends TransientSessionKeyManager

Expose the functionality to allow people to write out and read in the session key and session tag information via streams. This implementation does not write anywhere except where its told.

Nested Class Summary

Nested classes/interfaces inherited from class net.i2p.crypto.TransientSessionKeyManager
`TransientSessionKeyManager.OutboundSession, TransientSessionKeyManager.TagSet`

Field Summary

Fields inherited from class net.i2p.crypto.TransientSessionKeyManager
`_context, MAX_INBOUND_SESSION_TAGS, SESSION_LIFETIME_MAX_MS, SESSION_TAG_DURATION_MS`

Constructor Summary
`PersistentSessionKeyManager(I2PAppContext context)` The session key manager should only be constructed and accessed through the application context.

Method Summary
`void` `loadState(java.io.InputStream in)` Load the session key data from the given stream
`static void` `main(java.lang.String[] args)`
`void` `saveState(java.io.OutputStream out)` Write the session key data to the given stream

Methods inherited from class net.i2p.crypto.TransientSessionKeyManager
`aggressiveExpire, consumeNextAvailableTag, consumeTag, createSession, failTags, getAvailableTags, getAvailableTimeLeft, getCurrentKey, getInboundTagSets, getOutboundSessions, renderStatusHTML, setData, tagsDelivered, tagsReceived`

Methods inherited from class net.i2p.crypto.SessionKeyManager
`createSession, shutdown`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PersistentSessionKeyManager

    public PersistentSessionKeyManager(I2PAppContext context)

  The session key manager should only be constructed and accessed through the application context. This constructor should only be used by the appropriate application context itself.

Method Detail

### saveState

    public void saveState(java.io.OutputStream out)
                   throws java.io.IOException,
                          DataFormatException

  Write the session key data to the given stream

  Throws:
    `java.io.IOException`
    `DataFormatException`

### loadState

    public void loadState(java.io.InputStream in)
                   throws java.io.IOException,
                          DataFormatException

  Load the session key data from the given stream

  Throws:
    `java.io.IOException`
    `DataFormatException`

### main

    public static void main(java.lang.String[] args)