Class UDPAddress

java.lang.Object
net.i2p.router.transport.udp.UDPAddress

class UDPAddress extends Object
basic helper to parse out peer info from a udp address
  • Field Details

  • Constructor Details

  • Method Details

    • getHost

      public String getHost()
    • getHostAddress

      InetAddress getHostAddress()
      As of 0.9.32, will NOT resolve hostnames.
      Returns:
      InetAddress or null
    • getPort

      public int getPort()
      Returns:
      0 if unset or invalid
    • getIntroKey

      byte[] getIntroKey()
      Returns:
      shouldn't be null but will be if invalid
    • getIntroducerCount

      int getIntroducerCount()
    • getIntroducerHost

      InetAddress getIntroducerHost(int i)
      As of 0.9.32, will NOT resolve hostnames.
      Returns:
      null if invalid or for SSU2
      Throws:
      ArrayIndexOutOfBoundsException - if i < 0 or i >= getIntroducerCount()
    • getIntroducerPort

      int getIntroducerPort(int i)
      Returns:
      greater than zero or zero for SSU2
      Throws:
      ArrayIndexOutOfBoundsException - if i < 0 or i >= getIntroducerCount()
    • getIntroducerKey

      byte[] getIntroducerKey(int i)
      Returns:
      null if no keys or for SSU2
      Throws:
      ArrayIndexOutOfBoundsException - if i < 0 or i >= getIntroducerCount()
    • getIntroducerTag

      long getIntroducerTag(int i)
      Returns:
      greater than zero
      Throws:
      NullPointerException - if getIntroducerCount() == 0
      ArrayIndexOutOfBoundsException - if i < 0 or i >= getIntroducerCount()
    • getIntroducerExpiration

      long getIntroducerExpiration(int i)
      Returns:
      ms since epoch, zero if unset
      Throws:
      NullPointerException - if getIntroducerCount() == 0
      ArrayIndexOutOfBoundsException - if i < 0 or i >= getIntroducerCount()
      Since:
      0.9.30
    • getIntroducerHash

      Hash getIntroducerHash(int i)
      Returns:
      null if no keys or for SSU1
      Throws:
      ArrayIndexOutOfBoundsException - if i < 0 or i >= getIntroducerCount()
      Since:
      0.9.55
    • isIPv4

      boolean isIPv4()
      Since:
      0.9.55
    • isIPv6

      boolean isIPv6()
      Since:
      0.9.55
    • getMTU

      int getMTU()
      Returns:
      0 if unset or invalid; recitified via MTU.rectify()
      Since:
      0.9.2
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clearCache

      static void clearCache()
      Since:
      IPv6