public class PacketProtocolInformation
extends java.lang.Object
IPacket
.Constructor and Description |
---|
PacketProtocolInformation()
Constructs a new instance of PacketProtocolInformation.
|
PacketProtocolInformation(byte major,
byte minor)
Constructs a new instance of PacketProtocolInformation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Gets whether this object equals the passed object.
|
int |
getMajor()
Gets the major protocol for the packet.
|
int |
getMinor()
Gets the minor protocol for the packet.
|
static PacketProtocolInformation |
getProtocolInformation(java.io.InputStream inputStream)
Gets the
PacketProtocolInformation of the packet. |
int |
hashCode()
Gets the hash code of the object.
|
static void |
savePacketProtocolInformation(java.io.OutputStream outputStream,
PacketProtocolInformation information)
Saves the
PacketProtocolInformation of the packet. |
public PacketProtocolInformation()
public PacketProtocolInformation(byte major, byte minor)
major
- The major version.minor
- The minor version.public int getMajor()
public int getMinor()
public static PacketProtocolInformation getProtocolInformation(java.io.InputStream inputStream) throws java.io.IOException
PacketProtocolInformation
of the packet.inputStream
- The input stream for reading.java.lang.NullPointerException
- The inputStream is null.java.io.IOException
- A stream exception occurs.public static void savePacketProtocolInformation(java.io.OutputStream outputStream, PacketProtocolInformation information) throws java.io.IOException
PacketProtocolInformation
of the packet.outputStream
- The output stream for writing.information
- The protocol information.java.lang.NullPointerException
- A parameter is null.java.io.IOException
- A stream exception occurs.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object to check.public int hashCode()
hashCode
in class java.lang.Object