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()
XmlDataInterfacegetXmlData in interface XmlDataInterfacepublic void setFileName(java.lang.String newFileName)
XmlDataInterfacesetFileName in interface XmlDataInterfacepublic void setPath(java.lang.String newPath)
XmlDataInterfacesetPath in interface XmlDataInterfacepublic java.lang.String getFileName()
XmlDataInterfacegetFileName in interface XmlDataInterfacepublic java.lang.String getPath()
XmlDataInterfacegetPath in interface XmlDataInterfacepublic void setXmlData(java.lang.String data)
XmlDataInterfacesetXmlData in interface XmlDataInterfacepublic static XmlData readFromFile(java.lang.String file) throws java.io.IOException
java.io.IOExceptionpublic void writeToFile(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.UnsupportedEncodingException
java.io.FileNotFoundExceptionjava.io.UnsupportedEncodingExceptionpublic void save()
throws java.io.FileNotFoundException,
java.io.UnsupportedEncodingException
XmlDataInterfacesave in interface XmlDataInterfacejava.io.FileNotFoundExceptionjava.io.UnsupportedEncodingExceptionpublic void saveAs(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.UnsupportedEncodingException
XmlDataInterfacesaveAs in interface XmlDataInterfacefile - Complete path where to save the filejava.io.FileNotFoundExceptionjava.io.UnsupportedEncodingException