|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xiph.libshout.Shout
public class Shout
jlibshout: org.benow.jlibshout.Shout
| Field Summary | |
|---|---|
static java.lang.String |
AI_BITRATE
|
static java.lang.String |
AI_CHANNELS
|
static java.lang.String |
AI_QUALITY
|
static java.lang.String |
AI_SAMPLERATE
|
static int |
FORMAT_MP3
|
static int |
FORMAT_VORBIS
|
static java.lang.String |
METADATA_NAME
|
static java.lang.String |
METADATA_SONG
|
static java.lang.String |
METADATA_URL
|
static int |
PROTOCOL_HTTP
|
static int |
PROTOCOL_ICY
|
static int |
PROTOCOL_XAUDIOCAST
|
| Constructor Summary | |
|---|---|
Shout()
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Close the connection to the server |
void |
connect()
Connects to the server. |
protected void |
finalize()
|
java.lang.String |
getAgent()
Gets the agent used during http authentication |
java.lang.String |
getAudioInfo()
Gets the extended information describing the stream |
java.lang.String |
getDescription()
Gets the description of the stream. |
java.lang.String |
getDumpFile()
Gets the server dumpfile used to save the stream |
int |
getFormat()
Gets the format of the stream (ie ogg/mp3). |
java.lang.String |
getGenre()
Gets the genre for the strea |
java.lang.String |
getHost()
Gets the host to which shout is to connect |
java.lang.String |
getLastError()
Gets a description of the last error thrown by shout. |
java.lang.String |
getMount()
Get the protoocol used for the connection to the server. |
java.lang.String |
getName()
Gets the name of the stream. |
java.lang.String |
getPassword()
Gets the encoder password |
int |
getPort()
Gets the port on the host to which shout is to connect to |
int |
getProtocol()
Get the protoocol used for the connection to the server. |
java.lang.String |
getURL()
Gets the URL for the stream |
java.lang.String |
getUser()
Gets the user used for HTTP connections |
static java.lang.String |
getVersion()
|
boolean |
isPublic()
Gets whether or not the stream is public |
void |
setAgent(java.lang.String agent)
Sets the agent used during authentication |
void |
setAudioInfo(java.lang.String info)
Sets the extended information describing the stream |
void |
setDescription(java.lang.String desc)
Sets the description of the stream |
void |
setDumpfile(java.lang.String dumpfile)
Sets the name of the dumpfile to which the stream is to be saved |
void |
setFormat(int format)
Sets the format of the stream. |
void |
setGenre(java.lang.String genre)
Sets the genre for the strea |
void |
setHost(java.lang.String host)
Sets the host to which shout is to connect |
void |
setMetadata()
Sets the metadata to be the current. |
void |
setMount(java.lang.String mount)
Sets the mount used for the connection to the server |
void |
setName(java.lang.String name)
Sets the name of the stream |
void |
setPassword(java.lang.String password)
Sets the encoder password. |
void |
setPort(int port)
Set port on the host to which shout is to connect |
void |
setProtocol(int protocol)
Sets the protocol used for the connection to the server. |
void |
setPublic(boolean isPublic)
Sets the public flag. |
void |
setURL(java.lang.String url)
Sets the url for the stream |
void |
setUser(java.lang.String user)
Sets the user used for HTTP authentication |
void |
sync()
Waits until more data is required. |
void |
updateMetadata(java.lang.String name,
java.lang.String value)
Sets the metadata value for the given name. |
void |
write(byte[] toWrite)
Writes data to the open connection. |
void |
write(byte[] toWrite,
int offs,
int len)
Writes to the open connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FORMAT_VORBIS
public static final int FORMAT_MP3
public static final int PROTOCOL_HTTP
public static final int PROTOCOL_XAUDIOCAST
public static final int PROTOCOL_ICY
public static final java.lang.String AI_BITRATE
public static final java.lang.String AI_SAMPLERATE
public static final java.lang.String AI_CHANNELS
public static final java.lang.String AI_QUALITY
public static final java.lang.String METADATA_NAME
public static final java.lang.String METADATA_SONG
public static final java.lang.String METADATA_URL
| Constructor Detail |
|---|
public Shout()
throws ShoutException
ShoutException| Method Detail |
|---|
public static java.lang.String getVersion()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableObject.finalize()public java.lang.String getHost()
public void setHost(java.lang.String host)
throws ShoutException
host - the host to connect to
ShoutExceptionpublic int getPort()
public void setPort(int port)
throws ShoutException
port - on host to connect to
ShoutExceptionpublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
throws ShoutException
password - the password on the server
ShoutExceptionpublic java.lang.String getURL()
public void setURL(java.lang.String url)
throws ShoutException
url - the url for the stream
ShoutExceptionpublic java.lang.String getGenre()
public void setGenre(java.lang.String genre)
throws ShoutException
genre - the genre for the stream
ShoutExceptionpublic java.lang.String getUser()
public void setUser(java.lang.String user)
throws ShoutException
user - the user used for http authentication
ShoutExceptionpublic java.lang.String getAgent()
public void setAgent(java.lang.String agent)
throws ShoutException
agent - the agent used during authentication
ShoutException
public void setName(java.lang.String name)
throws ShoutException
name - the name of the stream
ShoutExceptionpublic java.lang.String getName()
public void setDescription(java.lang.String desc)
throws ShoutException
desc - the description of the stream
ShoutException - on painpublic java.lang.String getDescription()
public java.lang.String getDumpFile()
public void setDumpfile(java.lang.String dumpfile)
dumpfile - the name of the file on the server to which the stream is to be saved.
public void setAudioInfo(java.lang.String info)
throws ShoutException
info - the information describing the stream
ShoutExceptionpublic java.lang.String getAudioInfo()
public boolean isPublic()
public void setPublic(boolean isPublic)
throws ShoutException
isPublic - true if the stream is to be advertised, false if not.
ShoutException
public void setFormat(int format)
throws ShoutException
format -
ShoutExceptionpublic int getFormat()
public void setProtocol(int protocol)
throws ShoutException
protocol - sets the protocol used for the connection
ShoutExceptionpublic int getProtocol()
public void connect()
throws ShoutException
ShoutException
public void write(byte[] toWrite)
throws java.io.IOException,
ShoutException
toWrite -
java.io.IOException
ShoutException
public void write(byte[] toWrite,
int offs,
int len)
throws java.io.IOException,
ShoutException
toWrite - bytes to writeoffs - offset to start atlen - length to write
java.io.IOException
ShoutException
public void setMount(java.lang.String mount)
throws ShoutException
mount - sets the mount used for the connection
ShoutExceptionpublic java.lang.String getMount()
public java.lang.String getLastError()
public void sync()
public void close()
throws ShoutException
ShoutException - on bad
public void updateMetadata(java.lang.String name,
java.lang.String value)
throws ShoutException
name - name of the metadata entry. Could be one of the METADATA_* constants.value - value for the metadata entry
ShoutExceptionsetMetadata()
public void setMetadata()
throws ShoutException
shout.updateMetadata(Shout.METADATA_SONG,"New Track");
shout.setMetadata();
ShoutException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||