control
Class Control_Stream

java.lang.Object
  extended by control.Control_Stream

public class Control_Stream
extends java.lang.Object


Constructor Summary
Control_Stream(Gui_StreamRipStar mainGui)
           
 
Method Summary
 void addStreamToVector(Stream newStream)
          Add a stream to the vector of all streams
 java.util.Vector<java.lang.String> collectOptions(Stream stream)
          return all options for a stream in the way streamripper wants it
 void disableAllNewOptionsForAllStreams()
          disable all options that are newer than streamripper 1.63.5 in all streams
 java.lang.Boolean existURL(java.lang.String Url)
          looks if a Url in the streamVector already exist
 Stream getDefaultStream()
          returns the default stream the basic stream is the stream, with the default values for an new created stream
 java.lang.String getFileBrowserPath()
          Get the path to the filebrowser
 java.lang.String getGeneralPath()
          Get the path to where all stream should be saved
 java.lang.String getlongestName()
           
 java.lang.String getMP3PlayerPath()
          Get the path to the mp3Player
 java.lang.String[] getPaths()
          Collect all path together an pack it in a String[]
 int getPlaceInStreamVector(int id)
          looks on witch position in the vector a stream is
 Stream getStreamByID(int id)
          Look in der StreamVector, witch collects all streams for an stream with the given ID
 java.lang.String getStreamripperPath()
          Get the path to streamripper
 java.util.Vector<Stream> getStreamVector()
          Return the vector with all streams in it
 java.lang.String getWebBrowserPath()
          Get the path to the webbrowser
 void loadDefaultStreamOnStart()
          get the default stream from xml-file and create the stream object
 void loadStreamsOnStart()
          gets all stream from xml-file and create for every stream in xml-file an object
 void removeStreamFromVector(int id)
          Removes the stream, with the given id, from the vector of all streams
 void saveDefaultStream()
          saves all streams from the streamvector in the "Streams.xml" file
 void saveStreamVector()
          saves all streams from the streamvector in the "Streams.xml" file
 void setDefaultStream(Stream newDefaultStream)
          set a new default Stream
 void setPaths(java.lang.String[] path)
          update all path in this class
 void startMp3Player(java.lang.String content)
           
 java.lang.Process startStreamripper(Stream stream)
           
 void startWebBrowser(java.lang.String url)
           
 void stopAllStreams()
          stops all streams in the streamvector if the are recording
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Control_Stream

public Control_Stream(Gui_StreamRipStar mainGui)
Method Detail

saveStreamVector

public void saveStreamVector()
saves all streams from the streamvector in the "Streams.xml" file


saveDefaultStream

public void saveDefaultStream()
saves all streams from the streamvector in the "Streams.xml" file


getDefaultStream

public Stream getDefaultStream()
returns the default stream the basic stream is the stream, with the default values for an new created stream

Returns:

setDefaultStream

public void setDefaultStream(Stream newDefaultStream)
set a new default Stream


loadStreamsOnStart

public void loadStreamsOnStart()
gets all stream from xml-file and create for every stream in xml-file an object


loadDefaultStreamOnStart

public void loadDefaultStreamOnStart()
get the default stream from xml-file and create the stream object


addStreamToVector

public void addStreamToVector(Stream newStream)
Add a stream to the vector of all streams

Parameters:
newStream -

getStreamVector

public java.util.Vector<Stream> getStreamVector()
Return the vector with all streams in it

Returns:

getPaths

public java.lang.String[] getPaths()
Collect all path together an pack it in a String[]


setPaths

public void setPaths(java.lang.String[] path)
update all path in this class

Parameters:
path: - all path in a array

removeStreamFromVector

public void removeStreamFromVector(int id)
Removes the stream, with the given id, from the vector of all streams

Parameters:
id: - The id representing the stream in xml-file

getStreamripperPath

public java.lang.String getStreamripperPath()
Get the path to streamripper


getGeneralPath

public java.lang.String getGeneralPath()
Get the path to where all stream should be saved


getWebBrowserPath

public java.lang.String getWebBrowserPath()
Get the path to the webbrowser


getFileBrowserPath

public java.lang.String getFileBrowserPath()
Get the path to the filebrowser


getMP3PlayerPath

public java.lang.String getMP3PlayerPath()
Get the path to the mp3Player


startMp3Player

public void startMp3Player(java.lang.String content)

startWebBrowser

public void startWebBrowser(java.lang.String url)

startStreamripper

public java.lang.Process startStreamripper(Stream stream)

getlongestName

public java.lang.String getlongestName()

getStreamByID

public Stream getStreamByID(int id)
Look in der StreamVector, witch collects all streams for an stream with the given ID

Parameters:
id: - the ID for the stream in xml-file
Returns:
The Stream with the given ID

getPlaceInStreamVector

public int getPlaceInStreamVector(int id)
looks on witch position in the vector a stream is

Parameters:
id: - the stream ID in xml-file
Returns:
the position; -1 for not found

existURL

public java.lang.Boolean existURL(java.lang.String Url)
looks if a Url in the streamVector already exist

Parameters:
Url: - to test url
Returns:
true if exist, else false

stopAllStreams

public void stopAllStreams()
stops all streams in the streamvector if the are recording


disableAllNewOptionsForAllStreams

public void disableAllNewOptionsForAllStreams()
disable all options that are newer than streamripper 1.63.5 in all streams


collectOptions

public java.util.Vector<java.lang.String> collectOptions(Stream stream)
return all options for a stream in the way streamripper wants it

Parameters:
id: - the ID of the stream in xml-file