net.i2p.data.router

## Class RouterPrivateKeyFile

- java.lang.Object
- - net.i2p.data.PrivateKeyFile
  - - net.i2p.data.router.RouterPrivateKeyFile

-     public class RouterPrivateKeyFile
      extends PrivateKeyFile

  Handles router private key files, extending PrivateKeyFile to provide RouterIdentity access instead of Destination. Maintains the same file format as the parent class while adding router-specific functionality.

- - ### Field Summary

    - ### Fields inherited from class net.i2p.data.PrivateKeyFile

      `dest, file, privKey, signingPrivKey`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RouterPrivateKeyFile(File file)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RouterIdentity` | `getRouterIdentity()` Read it in from the file.

    - ### Methods inherited from class net.i2p.data.PrivateKeyFile

      `checkSignature, createIfAbsent, createIfAbsent, getDestination, getOfflineExpiration, getOfflineSignature, getSigningPrivKey, getTransientSigningPrivKey, getTransientSigningPubKey, isOffline, main, open, open, setCertType, setDestination, setKeyCert, setOfflineData, setSignedCert, toString, validateKeyPairs, verifySignature, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RouterPrivateKeyFile

          public RouterPrivateKeyFile(File file)

  - ### Method Detail

    - #### getRouterIdentity

          public RouterIdentity getRouterIdentity()
                                           throws IOException,
                                                  DataFormatException

      Read it in from the file. Also sets the local privKey and signingPrivKey.
      Throws:
        `IOException`
        `DataFormatException`