A B C D E F G H I L M P R S T U W

A

ArrayField - class eap.freeciv.ArrayField.
Represents a set of repeated fields in a packet.
ArrayField(String) - Constructor for class eap.freeciv.ArrayField
Create a new array with the given repeat count.
addField(Field) - Method in class eap.freeciv.ArrayField
Append a field to the end of the list of fields in this array.
addField(Field) - Method in class eap.freeciv.PacketStructure
Append a field to the end of this structure.
addIndex(int) - Method in class eap.freeciv.ArrayField
Add an index to this file.
addIndex(int) - Method in class eap.freeciv.BinaryField
 
addIndex(int) - Method in class eap.freeciv.BitField
 
addIndex(int) - Method in class eap.freeciv.Field
Alter the way this field references its data, so as to append an index.
addIndex(int) - Method in class eap.freeciv.SimpleField
Adds the given index in brackets to the end of the name of this field.
addPacketListener(PacketListener) - Method in class eap.freeciv.PacketConnection
Register a listener to receive the packets that this class reads from the socket.

B

BinaryField - class eap.freeciv.BinaryField.
 
BinaryField() - Constructor for class eap.freeciv.BinaryField
 
BitField - class eap.freeciv.BitField.
 
BitField() - Constructor for class eap.freeciv.BitField
 
BitStringField - class eap.freeciv.BitStringField.
 
BitStringField() - Constructor for class eap.freeciv.BitStringField
 
BooleanField - class eap.freeciv.BooleanField.
 
BooleanField(int) - Constructor for class eap.freeciv.BooleanField
 
beginListening() - Method in class eap.freeciv.PacketConnection
Starts the listening thread.
beginListening() - Method in class eap.freeciv.PassThrough
 

C

CityMap - class eap.freeciv.CityMap.
 
CityMap() - Constructor for class eap.freeciv.CityMap
 
CityMapField - class eap.freeciv.CityMapField.
 
CityMapField() - Constructor for class eap.freeciv.CityMapField
 
Client - class eap.freeciv.Client.
 
Client() - Constructor for class eap.freeciv.Client
 
connectToServer(String, int) - Method in class eap.freeciv.Client
 

D

deleteValue(String) - Method in class eap.freeciv.Packet
Removes the named value from the packet.
dump() - Method in class eap.freeciv.Packet
Prints a description of the packet to System.out.
dump(PrintStream) - Method in class eap.freeciv.Packet
Prints a description of the packet to the given PrintWriter.

E

eap.freeciv - package eap.freeciv
 

F

Field - class eap.freeciv.Field.
Represents a generic field in a packet structure.
Field() - Constructor for class eap.freeciv.Field
 

G

getClient() - Method in class eap.freeciv.PassThrough
 
getClientCount() - Method in class eap.freeciv.Server
 
getConnection() - Method in class eap.freeciv.Client
 
getConnection(int) - Method in class eap.freeciv.Server
return the connection to a given client
getConnection() - Method in class eap.freeciv.Server
return the connection to a given client
getID() - Method in class eap.freeciv.Packet
Returns the integer ID code for this packet.
getName() - Method in class eap.freeciv.Packet
Returns the name of the packet.
getName(int) - Method in class eap.freeciv.PacketBroker
Returns the packet name (not the format name) for a given ID.
getServer() - Method in class eap.freeciv.PassThrough
 
getSize(Packet) - Method in class eap.freeciv.ArrayField
Sum the sizes of all the elements in this array.
getSize(Packet) - Method in class eap.freeciv.BinaryField
 
getSize(Packet) - Method in class eap.freeciv.BitField
 
getSize(Packet) - Method in class eap.freeciv.Field
Returns the size of this field in bytes, given the values stored in a paket.
getSize(Packet) - Method in class eap.freeciv.SimpleField
Returns the size of this field.
getStructure(String) - Method in class eap.freeciv.PacketBroker
Return the structure corresponding to a given structure name.
getStructure(int) - Method in class eap.freeciv.PacketBroker
Returns the structure for a given Packet ID.
getValue(String) - Method in class eap.freeciv.Packet
Returns the value of the named field in the packet.
getValueSize(Packet) - Method in class eap.freeciv.BitStringField
 
getValueSize(Packet) - Method in class eap.freeciv.BooleanField
 
getValueSize(Packet) - Method in class eap.freeciv.CityMapField
 
getValueSize(Packet) - Method in class eap.freeciv.SignedIntField
 
getValueSize(Packet) - Method in class eap.freeciv.SimpleField
Returns the size of the data in this field.
getValueSize(Packet) - Method in class eap.freeciv.StringField
 
getValueSize(Packet) - Method in class eap.freeciv.TechListField
 
getValueSize(Packet) - Method in class eap.freeciv.UnsignedIntField
 
getValueSize(Packet) - Method in class eap.freeciv.WorkListField
 
getname() - Method in class eap.freeciv.SimpleField
Returns the name of this field.

H

hasValue(String) - Method in class eap.freeciv.Packet
Returns true if the named value has been set in this packet.

I

intValue(String) - Method in class eap.freeciv.Packet
Return the value of a field as an integer.
isOptional() - Method in class eap.freeciv.SimpleField
Indicates whether this field is optional.
isSet(Packet) - Method in class eap.freeciv.ArrayField
Returns true if all the fields for all the elements in the array are set in the given packet.
isSet(Packet) - Method in class eap.freeciv.BinaryField
 
isSet(Packet) - Method in class eap.freeciv.BitField
returns true if all the bit fields are set
isSet(Packet) - Method in class eap.freeciv.Field
Returns true if the value(s) for this field are set in the given packet
isSet(Packet) - Method in class eap.freeciv.SimpleField
Returns true if the packet has a value with the same name as this field.

L

listenForClient() - Method in class eap.freeciv.Server
 

M

main(String[]) - Static method in class eap.freeciv.Client
 
main(String[]) - Static method in class eap.freeciv.PassThrough
 

P

Packet - class eap.freeciv.Packet.
Acts as a repository for packet data.
Packet(String, int, PacketStructure) - Constructor for class eap.freeciv.Packet
Create a new packet with a given name, ID number and internal structure.
PacketBroker - class eap.freeciv.PacketBroker.
Generates PacketStructure objects, by reading XML configuration files.
PacketBroker() - Constructor for class eap.freeciv.PacketBroker
Create a new packet broker which will look for the configuration files in a default location.
PacketBroker(String) - Constructor for class eap.freeciv.PacketBroker
Create a new packet broker which will read the configuration from the given directory.
PacketConnection - class eap.freeciv.PacketConnection.
Represents a socket connection through which freeciv packets will flow.
PacketConnection(Socket) - Constructor for class eap.freeciv.PacketConnection
Create a new connection associated with the given socket.
PacketDumper - class eap.freeciv.PacketDumper.
 
PacketDumper(String) - Constructor for class eap.freeciv.PacketDumper
 
PacketListener - interface eap.freeciv.PacketListener.
An interface for objects which can receive packets from a PacketConnection.
PacketSource - class eap.freeciv.PacketSource.
Allows you to read packets from an InputStream.
PacketSource(InputStream, PacketBroker) - Constructor for class eap.freeciv.PacketSource
Creates a new packet source which will read from the given underlying stream and use the given packet broker to determine the structure of each packet.
PacketSource(InputStream) - Constructor for class eap.freeciv.PacketSource
Creates a new packet source which will use a default packet broker.
PacketStructure - class eap.freeciv.PacketStructure.
Describes the way a packet is encoded in a data stream.
PacketStructure() - Constructor for class eap.freeciv.PacketStructure
Create a new structure with no fields.
PassThrough - class eap.freeciv.PassThrough.
 
PassThrough(int, String, int) - Constructor for class eap.freeciv.PassThrough
 
Player - class eap.freeciv.Player.
 
Player() - Constructor for class eap.freeciv.Player
 
parseBinaryField(Element) - Method in class eap.freeciv.PacketBroker
Return a Field object for an XML element.

R

read(Packet, PacketSource) - Method in class eap.freeciv.ArrayField
 
read(Packet, PacketSource) - Method in class eap.freeciv.BinaryField
 
read(Packet, PacketSource) - Method in class eap.freeciv.BitField
 
read(PacketSource) - Method in class eap.freeciv.CityMap
 
read(Packet, PacketSource) - Method in class eap.freeciv.Field
Read the field from the given source and write its contents to the given packet.
read(Packet, PacketSource) - Method in class eap.freeciv.PacketStructure
Read the packet from the given source and store its values in the given packet.
read(Packet, PacketSource) - Method in class eap.freeciv.SimpleField
Read the value from the packet if it is present.
read(PacketSource) - Method in class eap.freeciv.TechList
 
read(PacketSource) - Method in class eap.freeciv.WorkList
 
readBody(PacketSource) - Method in class eap.freeciv.Packet
Sets the fields in this packet by reading them from the given PacketSource.
readByte() - Method in class eap.freeciv.PacketSource
Reads the next byte in the packet.
readBytes(byte[]) - Method in class eap.freeciv.PacketSource
Fill a byte array by reading from the stream.
readPacket() - Method in class eap.freeciv.PacketSource
Reads the next packet from the data stream.
readValue(Packet, PacketSource) - Method in class eap.freeciv.BitStringField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.BooleanField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.CityMapField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.SignedIntField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.SimpleField
Read the data in this field from the packet.
readValue(Packet, PacketSource) - Method in class eap.freeciv.StringField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.TechListField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.UnsignedIntField
 
readValue(Packet, PacketSource) - Method in class eap.freeciv.WorkListField
 
receivePacket(Packet) - Method in class eap.freeciv.Client
 
receivePacket(Packet) - Method in class eap.freeciv.PacketDumper
 
receivePacket(Packet) - Method in interface eap.freeciv.PacketListener
A PacketConnection calls this method for every registered listener every time it reads a packet from its underlying socket.
receivePacket(Packet) - Method in class eap.freeciv.Player
update the game state
receivePacket(Packet) - Method in class eap.freeciv.Server
broadcast the given packet to all the clients
remainingBytes() - Method in class eap.freeciv.PacketSource
Returns the number of unread bytes in the current packet, according to the size field in the packet header.
removeIndex() - Method in class eap.freeciv.ArrayField
calls removeIndex for all of the fields in this array.
removeIndex() - Method in class eap.freeciv.BinaryField
 
removeIndex() - Method in class eap.freeciv.BitField
 
removeIndex() - Method in class eap.freeciv.Field
Reverse the effects of the last call to Field.addIndex(int)
removeIndex() - Method in class eap.freeciv.SimpleField
 
run() - Method in class eap.freeciv.PacketConnection
This method is required by the Thread class.

S

Server - class eap.freeciv.Server.
 
Server(int) - Constructor for class eap.freeciv.Server
 
SignedIntField - class eap.freeciv.SignedIntField.
 
SignedIntField(int) - Constructor for class eap.freeciv.SignedIntField
 
SimpleField - class eap.freeciv.SimpleField.
Represents a field with a name and a single value.
SimpleField() - Constructor for class eap.freeciv.SimpleField
Create a new simple field.
StringField - class eap.freeciv.StringField.
 
StringField() - Constructor for class eap.freeciv.StringField
 
sendPacket(Packet) - Method in class eap.freeciv.PacketConnection
Send a packet through the socket.
setCondition(String) - Method in class eap.freeciv.SimpleField
Set a string describing a condition for whether this field should appear in the packet.
setName(String) - Method in class eap.freeciv.BinaryField
 
setName(String, int) - Method in class eap.freeciv.BitField
 
setName(String) - Method in class eap.freeciv.SimpleField
Set the name of this field.
setOptional(boolean) - Method in class eap.freeciv.SimpleField
Set whether this field is optional
setRepeat(String) - Method in class eap.freeciv.ArrayField
Sets the number of elements according to a given string.
setScale(double) - Method in class eap.freeciv.SimpleField
Set the scale factor for this packet.
setSize(String) - Method in class eap.freeciv.BinaryField
 
setValue(String, Object) - Method in class eap.freeciv.Packet
Set the value of a named field in the packet.
size() - Method in class eap.freeciv.CityMap
 
size(Packet) - Method in class eap.freeciv.PacketStructure
Calculate the size of the body of a given packet in bytes.
size() - Method in class eap.freeciv.TechList
 
size() - Method in class eap.freeciv.WorkList
 

T

TechList - class eap.freeciv.TechList.
 
TechList() - Constructor for class eap.freeciv.TechList
 
TechListField - class eap.freeciv.TechListField.
 
TechListField() - Constructor for class eap.freeciv.TechListField
 
testCondition(Packet) - Method in class eap.freeciv.SimpleField
Evaluate a test condition to see if a packets contains this field.
toString() - Method in class eap.freeciv.Packet
returns a string representing the name and ID number of this packet.

U

UnsignedIntField - class eap.freeciv.UnsignedIntField.
 
UnsignedIntField(int) - Constructor for class eap.freeciv.UnsignedIntField
 

W

WorkList - class eap.freeciv.WorkList.
This is a special data structure used in the Freeciv packets.
WorkList() - Constructor for class eap.freeciv.WorkList
 
WorkListField - class eap.freeciv.WorkListField.
 
WorkListField() - Constructor for class eap.freeciv.WorkListField
 
write(Packet, OutputStream) - Method in class eap.freeciv.ArrayField
 
write(Packet, OutputStream) - Method in class eap.freeciv.BinaryField
 
write(Packet, OutputStream) - Method in class eap.freeciv.BitField
 
write(OutputStream) - Method in class eap.freeciv.CityMap
 
write(Packet, OutputStream) - Method in class eap.freeciv.Field
Write this field to the given stream, taking values from the given packet.
write(OutputStream) - Method in class eap.freeciv.Packet
Write the header and contents of this packet to an output stream.
write(Packet, OutputStream) - Method in class eap.freeciv.PacketStructure
Write the body of the given packet to the given output stream.
write(Packet, OutputStream) - Method in class eap.freeciv.SimpleField
Write this field if it is present in the packet.
write(OutputStream) - Method in class eap.freeciv.TechList
 
write(OutputStream) - Method in class eap.freeciv.WorkList
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.BitStringField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.BooleanField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.CityMapField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.SignedIntField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.SimpleField
Write the data in this field.
writeValue(Object, OutputStream) - Method in class eap.freeciv.StringField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.TechListField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.UnsignedIntField
 
writeValue(Object, OutputStream) - Method in class eap.freeciv.WorkListField
 

A B C D E F G H I L M P R S T U W