com.neoworks.shout
Class Stream

java.lang.Object
  |
  +--com.neoworks.shout.Stream

public class Stream
extends java.lang.Object

This class holds the information for a [Shout|Ice]Cast stream. The information is read from a configuration file.

Author:
Nigel Atkinson (nigel@neoworks.com)

Constructor Summary
Stream()
          Public constructor
 
Method Summary
 int getBitrate()
          Get the stream bitrate indicator
 java.lang.String getPassword()
          Get the server password
 int getPort()
          Get the source connection port
 java.lang.String getPublicShout()
          Is this stream public?
 java.lang.String getServerName()
          Get the server name
 java.lang.String getStreamDescription()
          get the stream description
 java.lang.String getStreamName()
          Get the stream name
 int getTrackInfoPort()
          Get the port to send track information to
 java.lang.String getURL()
          Get the stream URL
 boolean loadConfig(java.lang.String filename)
          Load the config file and check it
 void setBitrate(int val)
          Set the stream bitrate indicator
 void setPassword(java.lang.String val)
          Set the server password
 void setPort(int val)
          Set the source connection port
 void setPublicShout(java.lang.String val)
          Set the public stream flag
 void setServerName(java.lang.String val)
          Set the server name
 void setStreamDescription(java.lang.String val)
          Set the stream description
 void setStreamName(java.lang.String val)
          Set the stream name
 void setTrackInfoPort(int val)
          Set the port to send track information to
 void setURL(java.lang.String val)
          Set the stream URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stream

public Stream()
Public constructor

Method Detail

getPublicShout

public java.lang.String getPublicShout()
Is this stream public?

Returns:
"yes" if the stream is public, "no" otherwise

setPublicShout

public void setPublicShout(java.lang.String val)
Set the public stream flag

Parameters:
val - The new value ("yes"|"no")

getStreamName

public java.lang.String getStreamName()
Get the stream name

Returns:
The name

setStreamName

public void setStreamName(java.lang.String val)
Set the stream name

Parameters:
val - The new name

getStreamDescription

public java.lang.String getStreamDescription()
get the stream description

Returns:
The description

setStreamDescription

public void setStreamDescription(java.lang.String val)
Set the stream description

Parameters:
val - The new description

getURL

public java.lang.String getURL()
Get the stream URL

Returns:
The URL

setURL

public void setURL(java.lang.String val)
Set the stream URL

Parameters:
val - The new URL

getServerName

public java.lang.String getServerName()
Get the server name

Returns:
The server name

setServerName

public void setServerName(java.lang.String val)
Set the server name

Parameters:
val - The new server name

getPassword

public java.lang.String getPassword()
Get the server password

Returns:
The server password

setPassword

public void setPassword(java.lang.String val)
Set the server password

Parameters:
val - The new password

getBitrate

public int getBitrate()
Get the stream bitrate indicator

Returns:
The bitrate (kb/s)

setBitrate

public void setBitrate(int val)
Set the stream bitrate indicator

Parameters:
val - The new bitrate (kb/s)

getTrackInfoPort

public int getTrackInfoPort()
Get the port to send track information to

Returns:
The port number

setTrackInfoPort

public void setTrackInfoPort(int val)
Set the port to send track information to

Parameters:
val - The new port number

getPort

public int getPort()
Get the source connection port

Returns:
The port number

setPort

public void setPort(int val)
Set the source connection port

Parameters:
val - The new port number

loadConfig

public boolean loadConfig(java.lang.String filename)
                   throws java.io.FileNotFoundException
Load the config file and check it

Parameters:
filename - The name of the config file
Returns:
Success
Throws:
java.io.FileNotFoundException - If the config file cannot be found