public final class SongUtils extends Object
Modifier and Type | Method and Description |
---|---|
static SongContext |
generateSong(InputStream inputStream,
String systemId,
long randomSeed)
Parses the XML file provided by the given input stream, creates an arrangement and a player and configures the player to use this arrangement.
|
static SongContext |
generateSong(InputStream inputStream,
String systemId,
String songName)
Parses the XML file provided by the given input stream, creates an arrangement and a player and configures the player to use this arrangement.
|
static SongContext |
generateSong(URL url,
long randomSeed)
Parses the XML file provided by the given input stream, creates an arrangement and a player and configures the player to use this arrangement.
|
static SongContext |
generateSong(URL url,
String songName)
Parses the XML file provided by the given input stream, creates an arrangement and a player and configures the player to use this arrangement.
|
static long |
getSongRandomSeed(String title)
Returns the random seed for the song title.
|
public static SongContext generateSong(URL url, long randomSeed) throws Exception
url
- the URLrandomSeed
- the random seedException
- in case of a problempublic static SongContext generateSong(InputStream inputStream, String systemId, long randomSeed) throws Exception
inputStream
- the input streamsystemId
- the system ID specifying the source of the input streamrandomSeed
- the random seedException
- in case of a problempublic static SongContext generateSong(URL url, String songName) throws Exception
url
- the URLsongName
- the song nameException
- in case of a problempublic static SongContext generateSong(InputStream inputStream, String systemId, String songName) throws Exception
inputStream
- the input streamsystemId
- the system ID specifying the source of the input streamsongName
- the song nameException
- in case of a problempublic static long getSongRandomSeed(String title)
title
- the song tile