|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ccs.xml.XSPFFile
public class XSPFFile
A low-level wrapper for a generic XSPF. This will read and write an XSPF DOM, and locate various elements which are likely to be of use, if they're there. The rest is up to you. Although not abstract, it is intended to be subclassed.
Field Summary | |
---|---|
protected javax.xml.parsers.DocumentBuilder |
builder
The DocumentBuilder which read this. |
protected java.lang.String |
title
The title of the complete playlist. |
protected org.w3c.dom.NodeList |
tracks
The list of track elements. |
protected org.w3c.dom.Document |
tree
The complete XSPF document. |
Constructor Summary | |
---|---|
XSPFFile()
Create an XSPF file. |
Method Summary | |
---|---|
protected org.w3c.dom.Element |
getPlaylist(org.w3c.dom.Document tree)
returns the <playlist> element. |
java.lang.String |
getTitle()
The title, after the XSPF has been read. |
protected org.w3c.dom.Element |
getTrackLocation(int idx)
Utility method. |
protected org.w3c.dom.Element |
getTrackTitle(int idx)
Utility method. |
void |
readFrom(java.io.InputStream src)
Read in the XSPF. |
void |
writeTo(java.io.OutputStream tgt)
Write the DOM tree . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String title
protected org.w3c.dom.Document tree
writeTo
.
protected org.w3c.dom.NodeList tracks
protected javax.xml.parsers.DocumentBuilder builder
Constructor Detail |
---|
public XSPFFile()
readFrom
.
Method Detail |
---|
public void readFrom(java.io.InputStream src) throws java.io.IOException
src
- Where to read it from.
java.io.IOException
public java.lang.String getTitle()
public void writeTo(java.io.OutputStream tgt) throws java.io.IOException
tree
.
tgt
- The stream to write to.
java.io.IOException
protected org.w3c.dom.Element getPlaylist(org.w3c.dom.Document tree)
protected org.w3c.dom.Element getTrackTitle(int idx)
idx
- The index of the track within the track list.
protected org.w3c.dom.Element getTrackLocation(int idx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |