control
Class Control_http_Shoutcast

java.lang.Object
  extended by control.Control_http_Shoutcast

public class Control_http_Shoutcast
extends java.lang.Object


Constructor Summary
Control_http_Shoutcast()
          the default constructor.
 
Method Summary
 java.lang.String getBaseAddress()
           
 int getCurrentPage()
          gives the current page back, which is loaded from shoutcast
 java.lang.String getfirstStreamFromURL(java.lang.String streamURL)
          This method look for the stream address + port in a .pls or .m3u file and return the first one found.
 int[] getPages()
          Returns the number of pages available with streams if this search.
 java.util.Vector<java.lang.String[]> getStreams()
          This Method return an Vector of Strings witch contains all streams from a specific genre
 void getStreamsPerGenre(java.lang.String genre, boolean keyword)
          Browse the list of stream on shoutcast.com in the given genre and save it into an Array of Strings into an vector called streaminfo. streaminfo contains following information: streamInfo[0] = Name streamInfo[1] = now Playing streamInfo[2] = Listeners streamInfo[3] = Bitrate streamInfo[4] = Format streamInfo[5] = ID
 void getStreamsPerKeyword(java.lang.String keyword)
          Browse the list of stream on shoutcast.com in the given genre and save it into an Array of Strings into an vector called streaminfo. streaminfo contains following information: streaminfo[0] = Name streaminfo[1] = now Playing streaminfo[2] = Listeners streaminfo[3] = Bitrate streaminfo[4] = Format streaminfo[5] = ID
 int getTotalPages()
          gives the total amount of pages back, which represents this search which all results
 void nextPage()
          Increases the to load page by one.
 void prevoiousPage()
          decreases the to load page by one.
 java.lang.String readNextHtmlLine()
          Read as long as the representing no-html String is empty from the incoming streamreader
 void resetPages()
          set the to laod page of the first one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Control_http_Shoutcast

public Control_http_Shoutcast()
the default constructor. Here is nothing to do at the moment

Method Detail

resetPages

public void resetPages()
set the to laod page of the first one


nextPage

public void nextPage()
Increases the to load page by one. This will only happen if the current page is not the last one


prevoiousPage

public void prevoiousPage()
decreases the to load page by one. This will only happen if the current page is not the first


getCurrentPage

public int getCurrentPage()
gives the current page back, which is loaded from shoutcast

Returns:
the current page for the current loaded search

getTotalPages

public int getTotalPages()
gives the total amount of pages back, which represents this search which all results

Returns:
All pages as an integer

getPages

public int[] getPages()
Returns the number of pages available with streams if this search.

Returns:
[0] returns the current page [1] returns the max available pages

getfirstStreamFromURL

public java.lang.String getfirstStreamFromURL(java.lang.String streamURL)
This method look for the stream address + port in a .pls or .m3u file and return the first one found. If it found a stream than it returns it. else it returns an empty string

Parameters:
streamURL -
Returns:

getStreamsPerGenre

public void getStreamsPerGenre(java.lang.String genre,
                               boolean keyword)
Browse the list of stream on shoutcast.com in the given genre and save it into an Array of Strings into an vector called streaminfo. streaminfo contains following information: streamInfo[0] = Name streamInfo[1] = now Playing streamInfo[2] = Listeners streamInfo[3] = Bitrate streamInfo[4] = Format streamInfo[5] = ID

Parameters:
genre - the keyword (most cases the genre)
keyword - true, if the search should be with keywords

getStreamsPerKeyword

public void getStreamsPerKeyword(java.lang.String keyword)
Browse the list of stream on shoutcast.com in the given genre and save it into an Array of Strings into an vector called streaminfo. streaminfo contains following information: streaminfo[0] = Name streaminfo[1] = now Playing streaminfo[2] = Listeners streaminfo[3] = Bitrate streaminfo[4] = Format streaminfo[5] = ID

Parameters:
genre - the keyword for searching
keyword - true, if the search should be with keywords

readNextHtmlLine

public java.lang.String readNextHtmlLine()
Read as long as the representing no-html String is empty from the incoming streamreader

Returns:
the text after the empty line

getStreams

public java.util.Vector<java.lang.String[]> getStreams()
This Method return an Vector of Strings witch contains all streams from a specific genre

Returns:

getBaseAddress

public java.lang.String getBaseAddress()