| Constructor and Description |
|---|
FileParameter.FileRepresentation(String filename)
Creates a new
FileParameter.FileRepresentation from a filename. |
FileParameter.FileRepresentation(StringBuffer buf)
The standard constructor for the interface
Storable
. |
FileParameter.FileRepresentation(String filename,
String content)
Creates a
FileParameter.FileRepresentation out of the filename and the
file's contents. |
| Modifier and Type | Method and Description |
|---|---|
FileParameter.FileRepresentation |
clone() |
String |
getContent()
Returns the content of the file.
|
String |
getExtension()
Returns the extension of this
FileParameter. |
String |
getFilename()
Returns the filename.
|
long |
getFilesize() |
void |
setExtension(String ext)
Sets the extension of this
FileParameter. |
void |
setFilename(String filename)
Sets the file name of this
FileParameter |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
public FileParameter.FileRepresentation(String filename, String content)
FileParameter.FileRepresentation out of the filename and the
file's contents.filename - the name of the filecontent - the contents of the filepublic FileParameter.FileRepresentation(String filename)
FileParameter.FileRepresentation from a filename.filename - the filenamepublic FileParameter.FileRepresentation(StringBuffer buf) throws NonParsableException
Storable
. Restores the FileParameter.FileRepresentation from an XML representation.buf - the XML representation as StringBufferNonParsableException - if the StringBuffer could not be parsedpublic FileParameter.FileRepresentation clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String getFilename()
public void setFilename(String filename)
FileParameterfilename - the new file namepublic long getFilesize()
public String getContent()
public void setExtension(String ext)
FileParameter.ext - the extensionpublic String getExtension()
FileParameter.public StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.