Class I2PSocketException

All Implemented Interfaces:
Serializable

public class I2PSocketException
extends SocketException
An I2P-specific IOException thrown from input and output streams, with a stored status code to be used for programmatic responses.
Since:
0.9.14
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • I2PSocketException

      public I2PSocketException​(int status)
      Use canned message for this status code. Standard codes from the router are 0-255, defined in MessageStatusMessage. Standard codes from client-side I2CP are 256-511, defined in SendMessageStatusListener. Standard codes from streaming are 512-767, defined here.
      Parameters:
      status - >= 0 from MessageStatusMessage or SendMessageStatusListener
    • I2PSocketException

      public I2PSocketException​(String message)
      Use message provided
  • Method Details

    • getStatus

      public int getStatus()
      For programmatic action based on specific failure code
      Returns:
      value from int constructor or -1 for String constructor
    • getMessage

      public String getMessage()
      For programmatic action based on specific failure code
      Overrides:
      getMessage in class Throwable
      Returns:
      canned message based on status in int constructor or message from String constructor
    • getLocalizedMessage

      public String getLocalizedMessage()
      Translated
      Overrides:
      getLocalizedMessage in class Throwable