java.lang.Object
jcsq.serverinfo.ServerInfo
- All Implemented Interfaces:
- java.lang.Cloneable
- public class ServerInfo
- extends java.lang.Object
- implements java.lang.Cloneable
Container for the info of current server.
ip
private java.lang.String ip
to
private boolean to
players
private byte players
maxPlayers
private byte maxPlayers
protocolVersion
private byte protocolVersion
port
private int port
hostAddressBuffer
private java.lang.StringBuffer hostAddressBuffer
nameBuffer
private java.lang.StringBuffer nameBuffer
mapBuffer
private java.lang.StringBuffer mapBuffer
infoBuffer
private java.lang.StringBuffer infoBuffer
dirBuffer
private java.lang.StringBuffer dirBuffer
descriptionBuffer
private java.lang.StringBuffer descriptionBuffer
ServerInfo
public ServerInfo()
setHostAddress
public void setHostAddress(byte b)
setMap
public void setMap(byte b)
setName
public void setName(byte b)
setGameInfoString
public void setGameInfoString(byte b)
setDir
public void setDir(byte b)
setDescription
public void setDescription(byte b)
getMap
public java.lang.String getMap()
getServerName
public java.lang.String getServerName()
getDescription
public java.lang.String getDescription()
getGameInfoString
public java.lang.String getGameInfoString()
setMaxPlayers
public void setMaxPlayers(byte b)
getMaxPlayers
public byte getMaxPlayers()
setPlayers
public void setPlayers(byte b)
setProtocolVersion
public void setProtocolVersion(byte b)
getProtocolVersion
public byte getProtocolVersion()
getPlayers
public byte getPlayers()
getPort
public int getPort()
setPort
public void setPort(int port)
isFull
public boolean isFull()
isEmpty
public boolean isEmpty()
timedOut
public boolean timedOut()
setTimedOut
public void setTimedOut(boolean b)
setIp
public void setIp(java.lang.String ip)
getIp
public java.lang.String getIp()
clone
public java.lang.Object clone()
- Description copied from class:
java.lang.Object
- This method may be called to create a new copy of the
Object. The typical behavior is as follows:
o == o.clone()
is false
o.getClass() == o.clone().getClass()
is true
o.equals(o)
is true
However, these are not strict requirements, and may
be violated if necessary. Of the three requirements, the
last is the most commonly violated, particularly if the
subclass does not override Object.equals(Object)>Object.equals(Object)
55 .
If the Object you call clone() on does not implement
java.lang.Cloneable (which is a placeholder interface), then
a CloneNotSupportedException is thrown. Notice that
Object does not implement Cloneable; this method exists
as a convenience for subclasses that do.
Object's implementation of clone allocates space for the
new Object using the correct class, without calling any
constructors, and then fills in all of the new field values
with the old field values. Thus, it is a shallow copy.
However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override
this method as follows (it should never fail):
public Object clone()
{
try
{
super.clone();
}
catch (CloneNotSupportedException e)
{
throw new InternalError(e.getMessage());
}
}