Package javazoom.spi.mpeg.sampled.file
Class MpegAudioFileReader
- java.lang.Object
-
- TAudioFileReader
-
- javazoom.spi.mpeg.sampled.file.MpegAudioFileReader
-
public class MpegAudioFileReader extends TAudioFileReaderThis class implements AudioFileReader for MP3 SPI.
-
-
Field Summary
Fields Modifier and Type Field Description static intINITAL_READ_LENGTHstatic java.lang.StringVERSION
-
Constructor Summary
Constructors Constructor Description MpegAudioFileReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.sound.sampled.AudioFileFormatgetAudioFileFormat(java.io.File file)Returns AudioFileFormat from File.javax.sound.sampled.AudioFileFormatgetAudioFileFormat(java.io.InputStream inputStream, long mediaLength)Returns AudioFileFormat from inputstream and medialength.javax.sound.sampled.AudioFileFormatgetAudioFileFormat(java.net.URL url)Returns AudioFileFormat from URL.javax.sound.sampled.AudioInputStreamgetAudioInputStream(java.io.File file)Returns AudioInputStream from file.javax.sound.sampled.AudioInputStreamgetAudioInputStream(java.io.InputStream inputStream)Return the AudioInputStream from the given InputStream.javax.sound.sampled.AudioInputStreamgetAudioInputStream(java.net.URL url)Returns AudioInputStream from url.protected voidloadShoutcastInfo(java.io.InputStream input, java.util.HashMap props)Load shoutcast (ICY) info.protected voidparseID3v1Frames(byte[] frames, java.util.HashMap props)Parser ID3v1 framesprotected voidparseID3v2Frames(java.io.InputStream frames, java.util.HashMap props)Parse ID3v2 frames to add album (TALB), title (TIT2), date (TYER), author (TPE1), copyright (TCOP), comment (COMM) ...protected java.lang.StringparseText(byte[] bframes, int offset, int size, int skip)Parse Text Frames.
-
-
-
Field Detail
-
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
-
INITAL_READ_LENGTH
public static int INITAL_READ_LENGTH
-
-
Method Detail
-
getAudioFileFormat
public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.File file) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOExceptionReturns AudioFileFormat from File.- Throws:
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOException
-
getAudioFileFormat
public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.net.URL url) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOExceptionReturns AudioFileFormat from URL.- Throws:
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOException
-
getAudioFileFormat
public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.InputStream inputStream, long mediaLength) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOExceptionReturns AudioFileFormat from inputstream and medialength.- Throws:
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOException
-
getAudioInputStream
public javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.File file) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOExceptionReturns AudioInputStream from file.- Throws:
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOException
-
getAudioInputStream
public javax.sound.sampled.AudioInputStream getAudioInputStream(java.net.URL url) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOExceptionReturns AudioInputStream from url.- Throws:
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOException
-
getAudioInputStream
public javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.InputStream inputStream) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOExceptionReturn the AudioInputStream from the given InputStream.- Throws:
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOException
-
parseID3v1Frames
protected void parseID3v1Frames(byte[] frames, java.util.HashMap props)Parser ID3v1 frames- Parameters:
frames-props-
-
parseID3v2Frames
protected void parseID3v2Frames(java.io.InputStream frames, java.util.HashMap props)Parse ID3v2 frames to add album (TALB), title (TIT2), date (TYER), author (TPE1), copyright (TCOP), comment (COMM) ...- Parameters:
frames-props-
-
parseText
protected java.lang.String parseText(byte[] bframes, int offset, int size, int skip)Parse Text Frames.- Parameters:
bframes-offset-size-skip-- Returns:
-
loadShoutcastInfo
protected void loadShoutcastInfo(java.io.InputStream input, java.util.HashMap props) throws java.io.IOExceptionLoad shoutcast (ICY) info.- Parameters:
input-props-- Throws:
java.io.IOException
-
-