|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.maps.MapFileServer
This class handles requests to upload and download files from map editor clients. It used to be just for map files, but now it can serve up any file type, since wizards need to send other kinds of files back and forth (e.g. source files).
Field Summary | |
static int |
MAXLENGTH
Arbitrary limit on the file size to be uploaded or downloaded. |
Constructor Summary | |
MapFileServer()
|
Method Summary | |
static byte[] |
downloadFile(java.lang.String user,
java.lang.String password,
java.lang.String path)
Returns the contents of the specified file. |
static boolean |
isBogusFile(java.io.File f)
Returns true if this is a file we don't want to save. |
static boolean |
isWizard(java.lang.String user,
java.lang.String password)
Returns true if this player is a valid wizard on this server. |
static java.lang.String |
uploadFile(java.lang.String user,
java.lang.String password,
java.lang.String path,
byte[] data)
Handles a MapEditor request to upload a file to the server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAXLENGTH
Constructor Detail |
public MapFileServer()
Method Detail |
public static byte[] downloadFile(java.lang.String user, java.lang.String password, java.lang.String path) throws org.apache.xmlrpc.XmlRpcException
user
- the wizard namepassword
- passwordpath
- path to the file
org.apache.xmlrpc.XmlRpcException
public static java.lang.String uploadFile(java.lang.String user, java.lang.String password, java.lang.String path, byte[] data)
user
- the wizard namepassword
- passwordpath
- where to save the file, relative to the wizard's
personal directory, e.g. "foo/bar.arch"data
- the file contents
public static boolean isWizard(java.lang.String user, java.lang.String password)
public static boolean isBogusFile(java.io.File f)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |