public class SocksException extends IOException
SocksException
represents an exception about SOCKS protocol.Constructor and Description |
---|
SocksException(int replyCode)
Constructs an instance of
SocksException with a code. |
SocksException(String msg)
Constructs an instance of
SocksException with a message. |
Modifier and Type | Method and Description |
---|---|
ServerReply |
getServerReply()
Returns server's reply.
|
static SocksException |
noAcceptableMethods()
Returns a
SocksException instance with a message "NO ACCEPTABLE METHODS". |
static SocksException |
protocolNotSupported()
Returns a
SocksException instance with a message "Protocol not supported". |
static SocksException |
serverReplyException(byte reply)
Returns a
SocksException instance with a message of reply. |
static SocksException |
serverReplyException(ServerReply reply)
Returns a
SocksException instance with a message of reply. |
void |
setServerReply(ServerReply serverReply)
Sets server's reply.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public SocksException(String msg)
SocksException
with a message.msg
- Message.public SocksException(int replyCode)
SocksException
with a code.replyCode
- The code that server Replied.public static final SocksException noAcceptableMethods()
SocksException
instance with a message "NO ACCEPTABLE METHODS".SocksException
.public static final SocksException protocolNotSupported()
SocksException
instance with a message "Protocol not supported".SocksException
.public static final SocksException serverReplyException(ServerReply reply)
SocksException
instance with a message of reply.reply
- Server's reply.SocksException
.public static final SocksException serverReplyException(byte reply)
SocksException
instance with a message of reply.reply
- Code of server's reply.SocksException
.public ServerReply getServerReply()
public void setServerReply(ServerReply serverReply)
serverReply
- Reply of the server.Copyright © 2015. All rights reserved.