data
Class OutputStringArrayList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<java.lang.String>
              extended by data.OutputStringArrayList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.List<java.lang.String>, java.util.RandomAccess

public class OutputStringArrayList
extends java.util.ArrayList<java.lang.String>

This class maintains a list of files that have already been added to iTunes that are outside of the iTunes Media Folder. Keeping a list of exclusions is necessary as programmatically adding tracks to iTunes from outside the music folder that already exist in the iTunes Media folder will result in duplicates being created in the iTunes media folder.

See Also:
Serialized Form

Field Summary
static java.lang.String ADDED_TRACKS_FILENAME
          The name and location of the all new tracks added to iTunes file.
static java.lang.String EXCLUSIONS_FILE_NAME
          The name and location of the Exclusions file.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OutputStringArrayList(java.lang.String fileName)
          Creates a new ExclusionsList object.
 
Method Summary
static OutputStringArrayList read(java.lang.String fileName)
          Reads a list of exclusions from the exclusions data file.
 void write(java.lang.String fileName)
          Writes the list of exclusions to a data file for later reference when tracks are added to iTunes programmatically.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

EXCLUSIONS_FILE_NAME

public static final java.lang.String EXCLUSIONS_FILE_NAME
The name and location of the Exclusions file.


ADDED_TRACKS_FILENAME

public static final java.lang.String ADDED_TRACKS_FILENAME
The name and location of the all new tracks added to iTunes file.

Constructor Detail

OutputStringArrayList

public OutputStringArrayList(java.lang.String fileName)
Creates a new ExclusionsList object.

Parameters:
fileName - The file to output the array list to.
Method Detail

write

public void write(java.lang.String fileName)
Writes the list of exclusions to a data file for later reference when tracks are added to iTunes programmatically.

Parameters:
fileName - The name of the file to output the array list to.

read

public static OutputStringArrayList read(java.lang.String fileName)
Reads a list of exclusions from the exclusions data file.

Parameters:
fileName - The name of the file to read the array list from.
Returns:
the ExclusionsList containing strings of file locations of Tracks that were previously added to iTunes.