|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpgbennett.id3.XingVBRHeader
public class XingVBRHeader
Reads information from a Xing info header. Thanks to the Scilla project
(http://www.xs4all.nl/~rwvtveer/scilla/) for code ideas.
| Constructor Summary | |
|---|---|
XingVBRHeader(java.io.RandomAccessFile raf,
long offset,
int layer,
int mpegVersion,
int sampleRate,
int channelMode)
Looks for a Xing VBR header in the file. |
|
| Method Summary | |
|---|---|
int |
getAvgBitrate()
Returns the average bit rate of the mpeg file if a Xing header exists and -1 otherwise. |
int |
getLength()
Returns the length (in bytes) of this Xing VBR header. |
int |
getNumBytes()
Returns the number of data bytes in the mpeg frames. |
int |
getNumFrames()
Returns the number of MPEG frames in the file passed to the constructor. |
int |
getPlayingTime()
Returns the calculated playing time of the mpeg file if a Xing header exists and -1 otherwise. |
byte[] |
getTOC()
Returns the toc used to seek to an area of this VBR file. |
int |
getVBRScale()
Returns the VBR scale used to generate this VBR file. |
boolean |
headerExists()
Returns true if a Xing VBR header was found in the file passed to the constructor. |
java.lang.String |
toString()
Return a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XingVBRHeader(java.io.RandomAccessFile raf,
long offset,
int layer,
int mpegVersion,
int sampleRate,
int channelMode)
throws java.io.IOException,
CorruptHeaderException
raf - the file to read fromoffset - the location of the first mpeg framelayer - the layer value read by the
MPEGAudioFrameHeadermpegVersion - the version value read by the
MPEGAudioFrameHeadersampleRate - the sample rate read by the
MPEGAudioFrameHeaderchannelMode - the channel mode read by the
MPEGAudioFrameHeader
java.io.IOException - if an error occurs
CorruptHeaderException - if an error occurs| Method Detail |
|---|
public boolean headerExists()
public int getNumFrames()
public int getNumBytes()
public int getVBRScale()
public byte[] getTOC()
public int getAvgBitrate()
public int getPlayingTime()
public java.lang.String toString()
toString in class java.lang.Objectpublic int getLength()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||