|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.ITunesXML
public class ITunesXML
This class provides an interface to the iTunes XML file that is maintained by iTunes. The iTunes XML file contains critical information for iTunesDSM such as the directory iTunes stores music to and the version of iTunes installed.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_LOG_FILE_NAME
The string name for the default log file. |
static java.lang.String |
ITUNES_XML_FILE_NAME
The file name of the iTunes XML file that iTunes automatically generates and maintains. |
Constructor Summary | |
---|---|
ITunesXML()
Creates a new ITunesXML object with a null iTunes XML file. |
|
ITunesXML(java.io.File iTunesXMLFile)
Creates a new ITunesXML object with the given iTunes XML File. |
Method Summary | |
---|---|
java.lang.String |
decodeXMLURLLocation(java.lang.String url)
Converts UTF-8 encoded location strings from the iTunes XML file. |
java.io.File |
getITunesDirectory()
Returns the directory that iTunes stores music to. |
java.util.ArrayList<java.io.File> |
getITunesTrackLocationsByLine()
Reads the iTunesXML file by line and parses the locations of all iTunes tracks. |
java.lang.String |
getITunesVersion()
Reads the iTunes XML file for the version number of the iTunes installation relating to the XML file. |
java.io.File |
getiTunesXMLFile()
Returns the iTunes XML file |
static void |
main(java.lang.String[] args)
|
java.lang.String |
searchXMLForProperty(java.lang.String searchLine)
Searches the iTunes XML file for a given string. |
void |
setiTunesXMLFile(java.io.File iTunesXMLFile)
Sets the iTunes XML file to a given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ITUNES_XML_FILE_NAME
public static java.lang.String DEFAULT_LOG_FILE_NAME
Constructor Detail |
---|
public ITunesXML(java.io.File iTunesXMLFile)
iTunesXMLFile
- The iTunes XML File.public ITunesXML()
Method Detail |
---|
public java.util.ArrayList<java.io.File> getITunesTrackLocationsByLine()
public java.lang.String decodeXMLURLLocation(java.lang.String url)
url
- The string encoded in UTF-8 in the iTunes XML file that
should be parsed to a standard file location string.
public java.lang.String searchXMLForProperty(java.lang.String searchLine)
searchLine
- The string to search the iTunes XML file for.
Typically, one would search for a specific property of iTunes such
as the version number or the iTunes music directory. In other words,
a unique line of information in the iTunes XML file.
public java.io.File getITunesDirectory()
public java.lang.String getITunesVersion()
public java.io.File getiTunesXMLFile()
public void setiTunesXMLFile(java.io.File iTunesXMLFile)
iTunesXMLFile
- the file to set the iTunes XML file to.public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |