public class MethodSelectionMessage extends Object implements ReadableMessage, WritableMessage
MethodSelectionMessage
represents a method selection message.Constructor and Description |
---|
MethodSelectionMessage() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Returns the byte array of the message.
|
int |
getLength()
Returns the length of message.
|
int[] |
getMethods() |
int |
getnMethod() |
int |
getVersion() |
void |
read(InputStream inputStream)
Read message from a input stream.
|
void |
setMethods(int[] methods) |
void |
setnMethod(int nMethod) |
void |
setVersion(int version) |
public byte[] getBytes()
WritableMessage
getBytes
in interface WritableMessage
public int getLength()
Message
public void read(InputStream inputStream) throws SocksException, IOException
ReadableMessage
read
in interface ReadableMessage
inputStream
- Input stream.SocksException
- If a SOCKS protocol error occurred.IOException
- If an I/O error occurred.public int getVersion()
public void setVersion(int version)
public int getnMethod()
public void setnMethod(int nMethod)
public int[] getMethods()
public void setMethods(int[] methods)
Copyright © 2015. All rights reserved.