Socks5CommandType Class — netty Architecture
Architecture documentation for the Socks5CommandType class in Socks5CommandType.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD dca195e3_1bb8_922d_9a6e_38c2c2ea114c["Socks5CommandType"] bbd92464_5414_db2d_e84d_5533c71a5c5f["Socks5CommandType.java"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|defined in| bbd92464_5414_db2d_e84d_5533c71a5c5f db89d37b_7b02_3e20_6fc6_f1462e5ca7f5["Socks5CommandType()"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|method| db89d37b_7b02_3e20_6fc6_f1462e5ca7f5 c0416e47_b862_4c07_dd11_77878687f81d["byteValue()"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|method| c0416e47_b862_4c07_dd11_77878687f81d 9a7ecd63_57cb_dcbd_796e_063c5cf6cce4["hashCode()"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|method| 9a7ecd63_57cb_dcbd_796e_063c5cf6cce4 5409251d_3d87_c45b_e7db_8c11979a6a95["equals()"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|method| 5409251d_3d87_c45b_e7db_8c11979a6a95 c04e4ecf_1e43_0880_187b_41804764b367["compareTo()"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|method| c04e4ecf_1e43_0880_187b_41804764b367 03678ec3_8923_33ba_8eb6_667dc6dea4d7["String()"] dca195e3_1bb8_922d_9a6e_38c2c2ea114c -->|method| 03678ec3_8923_33ba_8eb6_667dc6dea4d7
Relationship Graph
Source Code
codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5CommandType.java lines 24–87
public class Socks5CommandType implements Comparable<Socks5CommandType> {
public static final Socks5CommandType CONNECT = new Socks5CommandType(0x01, "CONNECT");
public static final Socks5CommandType BIND = new Socks5CommandType(0x02, "BIND");
public static final Socks5CommandType UDP_ASSOCIATE = new Socks5CommandType(0x03, "UDP_ASSOCIATE");
public static Socks5CommandType valueOf(byte b) {
switch (b) {
case 0x01:
return CONNECT;
case 0x02:
return BIND;
case 0x03:
return UDP_ASSOCIATE;
}
return new Socks5CommandType(b);
}
private final byte byteValue;
private final String name;
private String text;
public Socks5CommandType(int byteValue) {
this(byteValue, "UNKNOWN");
}
public Socks5CommandType(int byteValue, String name) {
this.name = ObjectUtil.checkNotNull(name, "name");
this.byteValue = (byte) byteValue;
}
public byte byteValue() {
return byteValue;
}
@Override
public int hashCode() {
return byteValue;
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Socks5CommandType)) {
return false;
}
return byteValue == ((Socks5CommandType) obj).byteValue;
}
@Override
public int compareTo(Socks5CommandType o) {
return byteValue - o.byteValue;
}
@Override
public String toString() {
String text = this.text;
if (text == null) {
this.text = text = name + '(' + (byteValue & 0xFF) + ')';
}
return text;
}
}
Source
Frequently Asked Questions
What is the Socks5CommandType class?
Socks5CommandType is a class in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5CommandType.java.
Where is Socks5CommandType defined?
Socks5CommandType is defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5CommandType.java at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free