|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolution.player.core.media.MediaInfoBuilder<E>
E
- the type of the media info to buildpublic class MediaInfoBuilder<E extends MediaInfo>
A media info builder can build a media info. The difference to
MediaInfo.create(File)
is that the media info builder can write to a
file. Hint that it is only possible to modify a subset of media infos.
Method Summary | |
---|---|
E |
build()
Create the result of the build. |
static MediaInfoBuilder<MediaInfo> |
createBuilder()
Create a builder which does modify a data structure in memory. |
static MediaInfoBuilder<LocalMediaInfo> |
createLocalBuilder(java.io.File file)
Create a builder which does modify the given file if such a builder exist. |
MediaInfoBuilder<E> |
setAlbumName(java.lang.String name)
Set the name of the album to the given string. |
MediaInfoBuilder<E> |
setArtistName(java.lang.String name)
Set the name of the artist to the given string. |
MediaInfoBuilder<E> |
setMusicbrainzId(java.lang.String mbid,
MediaInfo.MusicbrainzIdType type)
Set the given musibrainz id of the given type. |
MediaInfoBuilder<E> |
setSongName(java.lang.String name)
Set the name of the song to the given string. |
MediaInfoBuilder<E> |
setTag(java.lang.String key,
java.lang.String value)
Set the tag with the given key to the given value. |
MediaInfoBuilder<E> |
setTrackNumber(int trackNumber)
Set the track number of the song to the given number. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MediaInfoBuilder<LocalMediaInfo> createLocalBuilder(java.io.File file)
file
- the file to modify
public static MediaInfoBuilder<MediaInfo> createBuilder()
public E build() throws java.io.IOException
java.io.IOException
- if the media info could not be buildpublic MediaInfoBuilder<E> setSongName(java.lang.String name) throws java.io.IOException
name
- the name of the song
java.io.IOException
- if the song name could not be storedpublic MediaInfoBuilder<E> setAlbumName(java.lang.String name) throws java.io.IOException
name
- the name of the album
java.io.IOException
- if the album name could not be storedpublic MediaInfoBuilder<E> setArtistName(java.lang.String name) throws java.io.IOException
name
- the name of the artist
java.io.IOException
- if the artist name could not be storedpublic MediaInfoBuilder<E> setTrackNumber(int trackNumber) throws java.io.IOException
trackNumber
- the number of the track
java.io.IOException
- if the track number could not be storedpublic MediaInfoBuilder<E> setMusicbrainzId(java.lang.String mbid, MediaInfo.MusicbrainzIdType type) throws java.io.IOException
mbid
- the musicbrainz idtype
- the type of the id
java.io.IOException
- if id could not be storedpublic MediaInfoBuilder<E> setTag(java.lang.String key, java.lang.String value) throws java.io.IOException
key
- the key of the tagvalue
- the value of the tag
java.io.IOException
- if tag could not be stored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |