Package net.i2p.client.streaming
Class I2PSocketException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.io.IOException
- 
- java.net.SocketException
- 
- net.i2p.client.streaming.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 SummaryFields Modifier and Type Field Description static intSTATUS_CONNECTION_RESETRouter and I2CP status codes are 0 - 511.
 - 
Constructor SummaryConstructors Constructor Description I2PSocketException(int status)Use canned message for this status code.I2PSocketException(String message)Use message provided
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalizedMessage()TranslatedStringgetMessage()For programmatic action based on specific failure codeintgetStatus()For programmatic action based on specific failure code- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Field Detail- 
STATUS_CONNECTION_RESETpublic static final int STATUS_CONNECTION_RESET Router and I2CP status codes are 0 - 511. Start ours at 512.- Since:
- 0.9.19
- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
I2PSocketExceptionpublic 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
 
 - 
I2PSocketExceptionpublic I2PSocketException(String message) Use message provided
 
- 
 - 
Method Detail- 
getStatuspublic int getStatus() For programmatic action based on specific failure code- Returns:
- value from int constructor or -1 for String constructor
 
 - 
getMessagepublic String getMessage() For programmatic action based on specific failure code- Overrides:
- getMessagein class- Throwable
- Returns:
- canned message based on status in int constructor or message from String constructor
 
 - 
getLocalizedMessagepublic String getLocalizedMessage() Translated- Overrides:
- getLocalizedMessagein class- Throwable
 
 
- 
 
-