javazoom.jlgui.player.amp.tag
Class MpegInfo

java.lang.Object
  extended by javazoom.jlgui.player.amp.tag.MpegInfo
All Implemented Interfaces:
TagInfo

public class MpegInfo
extends java.lang.Object
implements TagInfo

This class gives information (audio format and comments) about MPEG file or URL.


Field Summary
protected  java.lang.String album
           
protected  java.lang.String artist
           
protected  int channels
           
protected  java.lang.String channelsMode
           
protected  java.util.Vector comments
           
protected  boolean copyright
           
protected  boolean crc
           
protected  java.lang.String emphasis
           
protected  java.lang.String genre
           
protected  java.lang.String layer
           
protected  java.lang.String location
           
protected  int nominalbitrate
           
protected  boolean original
           
protected  boolean priv
           
protected  int rate
           
protected  long size
           
protected  java.lang.String title
           
protected  long total
           
protected  int track
           
protected  boolean vbr
           
protected  java.lang.String vendor
           
protected  java.lang.String version
           
protected  java.lang.String year
           
 
Constructor Summary
MpegInfo()
          Constructor.
 
Method Summary
 java.lang.String getAlbum()
          Get the name of the album upon which the song resides
 java.lang.String getArtist()
          Get the artist that performed the song
 int getBitRate()
          Get Nominal Bitrate
 int getChannels()
          Get channels.
 java.lang.String getChannelsMode()
          Get channels mode.
 java.util.Vector getComment()
          Get any comments provided about the song
 boolean getCopyright()
           
 boolean getCRC()
           
 java.lang.String getEmphasis()
           
 java.lang.String getGenre()
          Get the genre string of the music
 java.lang.String getLayer()
           
 java.lang.String getLocation()
           
 boolean getOriginal()
           
 long getPlayTime()
          Get play time in seconds.
 int getSamplingRate()
          Get Sampling Rate
 long getSize()
           
 java.lang.String getTitle()
          Get the title of the song.
 int getTrack()
          Get the track number of this track on the album
 boolean getVBR()
           
 java.lang.String getVersion()
           
 java.lang.String getYear()
          Get the year the track was released
 void load(java.io.File input)
          Load and parse MPEG info from File.
 void load(java.io.InputStream input)
          Load and parse MPEG info from InputStream.
 void load(java.net.URL input)
          Load and parse MPEG info from URL.
protected  void loadInfo(javax.sound.sampled.AudioFileFormat aff)
          Load info from AudioFileFormat.
protected  void loadInfo(java.io.File file)
          Load MP3 info from file.
protected  void loadInfo(java.io.InputStream input)
          Load info from input stream.
protected  void loadInfo(java.net.URL input)
          Load MP3 info from URL.
protected  void loadShoutastInfo(javax.sound.sampled.AudioFileFormat aff)
          Load Shoutcast info from AudioFileFormat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channels

protected int channels

channelsMode

protected java.lang.String channelsMode

version

protected java.lang.String version

rate

protected int rate

layer

protected java.lang.String layer

emphasis

protected java.lang.String emphasis

nominalbitrate

protected int nominalbitrate

total

protected long total

vendor

protected java.lang.String vendor

location

protected java.lang.String location

size

protected long size

copyright

protected boolean copyright

crc

protected boolean crc

original

protected boolean original

priv

protected boolean priv

vbr

protected boolean vbr

track

protected int track

year

protected java.lang.String year

genre

protected java.lang.String genre

title

protected java.lang.String title

artist

protected java.lang.String artist

album

protected java.lang.String album

comments

protected java.util.Vector comments
Constructor Detail

MpegInfo

public MpegInfo()
Constructor.

Method Detail

load

public void load(java.io.File input)
          throws java.io.IOException,
                 javax.sound.sampled.UnsupportedAudioFileException
Load and parse MPEG info from File.

Specified by:
load in interface TagInfo
Parameters:
input -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

load

public void load(java.net.URL input)
          throws java.io.IOException,
                 javax.sound.sampled.UnsupportedAudioFileException
Load and parse MPEG info from URL.

Specified by:
load in interface TagInfo
Parameters:
input -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

load

public void load(java.io.InputStream input)
          throws java.io.IOException,
                 javax.sound.sampled.UnsupportedAudioFileException
Load and parse MPEG info from InputStream.

Specified by:
load in interface TagInfo
Parameters:
input -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

loadInfo

protected void loadInfo(java.io.InputStream input)
                 throws java.io.IOException,
                        javax.sound.sampled.UnsupportedAudioFileException
Load info from input stream.

Parameters:
input -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

loadInfo

protected void loadInfo(java.io.File file)
                 throws java.io.IOException,
                        javax.sound.sampled.UnsupportedAudioFileException
Load MP3 info from file.

Parameters:
file -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

loadInfo

protected void loadInfo(javax.sound.sampled.AudioFileFormat aff)
                 throws javax.sound.sampled.UnsupportedAudioFileException
Load info from AudioFileFormat.

Parameters:
aff -
Throws:
javax.sound.sampled.UnsupportedAudioFileException

loadInfo

protected void loadInfo(java.net.URL input)
                 throws java.io.IOException,
                        javax.sound.sampled.UnsupportedAudioFileException
Load MP3 info from URL.

Parameters:
input -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

loadShoutastInfo

protected void loadShoutastInfo(javax.sound.sampled.AudioFileFormat aff)
                         throws java.io.IOException,
                                javax.sound.sampled.UnsupportedAudioFileException
Load Shoutcast info from AudioFileFormat.

Parameters:
aff -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

getVBR

public boolean getVBR()

getChannels

public int getChannels()
Description copied from interface: TagInfo
Get channels.

Specified by:
getChannels in interface TagInfo
Returns:
channels

getVersion

public java.lang.String getVersion()

getEmphasis

public java.lang.String getEmphasis()

getCopyright

public boolean getCopyright()

getCRC

public boolean getCRC()

getOriginal

public boolean getOriginal()

getLayer

public java.lang.String getLayer()

getSize

public long getSize()

getLocation

public java.lang.String getLocation()

getSamplingRate

public int getSamplingRate()
Description copied from interface: TagInfo
Get Sampling Rate

Specified by:
getSamplingRate in interface TagInfo
Returns:
sampling rate

getBitRate

public int getBitRate()
Description copied from interface: TagInfo
Get Nominal Bitrate

Specified by:
getBitRate in interface TagInfo
Returns:
bitrate in bps

getPlayTime

public long getPlayTime()
Description copied from interface: TagInfo
Get play time in seconds.

Specified by:
getPlayTime in interface TagInfo
Returns:
play time in seconds

getTitle

public java.lang.String getTitle()
Description copied from interface: TagInfo
Get the title of the song.

Specified by:
getTitle in interface TagInfo
Returns:
the title of the song

getArtist

public java.lang.String getArtist()
Description copied from interface: TagInfo
Get the artist that performed the song

Specified by:
getArtist in interface TagInfo
Returns:
the artist that performed the song

getAlbum

public java.lang.String getAlbum()
Description copied from interface: TagInfo
Get the name of the album upon which the song resides

Specified by:
getAlbum in interface TagInfo
Returns:
the album name

getTrack

public int getTrack()
Description copied from interface: TagInfo
Get the track number of this track on the album

Specified by:
getTrack in interface TagInfo
Returns:
the track number

getGenre

public java.lang.String getGenre()
Description copied from interface: TagInfo
Get the genre string of the music

Specified by:
getGenre in interface TagInfo
Returns:
the genre string

getComment

public java.util.Vector getComment()
Description copied from interface: TagInfo
Get any comments provided about the song

Specified by:
getComment in interface TagInfo
Returns:
the comments

getYear

public java.lang.String getYear()
Description copied from interface: TagInfo
Get the year the track was released

Specified by:
getYear in interface TagInfo
Returns:
the year the track was released

getChannelsMode

public java.lang.String getChannelsMode()
Get channels mode.

Returns:
channels mode


JavaZOOM 1999-2006