public class XmlData extends java.lang.Object implements XmlDataInterface
Constructor and Description |
---|
XmlData() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileName()
Get the file name where this object is or will be stored
|
java.lang.String |
getPath()
Get the path where this object is or will be stored
|
java.lang.String |
getXmlData()
Get the XML text representing this object
|
static XmlData |
readFromFile(java.lang.String file) |
void |
save()
Save this object into a file.
|
void |
saveAs(java.lang.String file)
Save this object into a file with the give file name
|
void |
setFileName(java.lang.String newFileName)
Set the file name where this object is or will be stored
|
void |
setPath(java.lang.String newPath)
Set the path where this object is or will be stored
|
void |
setXmlData(java.lang.String data)
Set the XML text representing this object
|
void |
writeToFile(java.lang.String file) |
public java.lang.String getXmlData()
XmlDataInterface
getXmlData
in interface XmlDataInterface
public void setFileName(java.lang.String newFileName)
XmlDataInterface
setFileName
in interface XmlDataInterface
public void setPath(java.lang.String newPath)
XmlDataInterface
setPath
in interface XmlDataInterface
public java.lang.String getFileName()
XmlDataInterface
getFileName
in interface XmlDataInterface
public java.lang.String getPath()
XmlDataInterface
getPath
in interface XmlDataInterface
public void setXmlData(java.lang.String data)
XmlDataInterface
setXmlData
in interface XmlDataInterface
public static XmlData readFromFile(java.lang.String file) throws java.io.IOException
java.io.IOException
public void writeToFile(java.lang.String file) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
public void save() throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
XmlDataInterface
save
in interface XmlDataInterface
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
public void saveAs(java.lang.String file) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
XmlDataInterface
saveAs
in interface XmlDataInterface
file
- Complete path where to save the filejava.io.FileNotFoundException
java.io.UnsupportedEncodingException