📄 mp3file.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Fri Oct 19 00:05:04 EDT 2001 -->
<TITLE>
jd3Lib - A Java ID3/MP3 Library: Class MP3File
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../helliker/id3/MP3Comparator.html"><B>PREV CLASS</B></A>
<A HREF="../../helliker/id3/MP3FileFilter.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="MP3File.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
helliker.id3</FONT>
<BR>
Class MP3File</H2>
<PRE>
java.lang.Object
|
+--<B>helliker.id3.MP3File</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Comparable</DD>
</DL>
<HR>
<DL>
<DT>public class <B>MP3File</B><DT>extends java.lang.Object<DT>implements java.lang.Comparable</DL>
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#BOTH_TAGS">BOTH_TAGS</A></B></CODE>
<BR>
Write ID3v1 and ID3v2 tags whether or not they exist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#EXISTING_TAGS_ONLY">EXISTING_TAGS_ONLY</A></B></CODE>
<BR>
Only write and read tags that already exist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#ID3V1_ONLY">ID3V1_ONLY</A></B></CODE>
<BR>
Write and read from ID3v1 tags only.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#ID3V2_ONLY">ID3V2_ONLY</A></B></CODE>
<BR>
Write and read from ID3v2 tags only.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#NO_TAGS">NO_TAGS</A></B></CODE>
<BR>
Do not write or read from any id3 tags.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#MP3File(java.io.File)">MP3File</A></B>(java.io.File mp3)</CODE>
<BR>
Create an MP3File object that reads and writes to the specified file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#MP3File(java.io.File, int)">MP3File</A></B>(java.io.File mp3, int tagType)</CODE>
<BR>
Create and MP3File object that reads and writes to the specified file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#MP3File(java.lang.String)">MP3File</A></B>(java.lang.String fn)</CODE>
<BR>
Create an MP3File object that reads and writes to the file with the filename fn.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#MP3File(java.lang.String, int)">MP3File</A></B>(java.lang.String fn, int tagType)</CODE>
<BR>
Create an MP3File object that reads and writes to the file with the filename fn.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#compareTo(java.lang.Object)">compareTo</A></B>(java.lang.Object o)</CODE>
<BR>
Compare this MP3File to the specified object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object o)</CODE>
<BR>
Returns true if the object o is equal to this MP3File.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getAlbum()">getAlbum</A></B>()</CODE>
<BR>
Returns the album of the mp3 if set and the empty string if not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getArtist()">getArtist</A></B>()</CODE>
<BR>
Returns the artist of the mp3 if set and the empty string if not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getBitRate()">getBitRate</A></B>()</CODE>
<BR>
Returns the bit rate of this mp3 in kbps.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getComment()">getComment</A></B>()</CODE>
<BR>
Returns the comment field of this mp3 if set and the empty string if not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getComposer()">getComposer</A></B>()</CODE>
<BR>
Returns the composer of this mp3 if set and the empty string if not (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getCopyrightInfo()">getCopyrightInfo</A></B>()</CODE>
<BR>
Returns the copyright info of this mp3 if set and the empty string if not (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getEncodedBy()">getEncodedBy</A></B>()</CODE>
<BR>
Returns who encoded this mp3 if set and the empty string if not (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getFileName()">getFileName</A></B>()</CODE>
<BR>
Returns the filename of this MP3File.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getFileSize()">getFileSize</A></B>()</CODE>
<BR>
Return the filesize of this MP3File (in bytes).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getFrameDataBytes(java.lang.String)">getFrameDataBytes</A></B>(java.lang.String id)</CODE>
<BR>
Returns the data contained in the frame specified by the id (id3v2 only) .</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getFrameDataString(java.lang.String)">getFrameDataString</A></B>(java.lang.String id)</CODE>
<BR>
Returns the textual information contained in the frame specifed by the id.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getGenre()">getGenre</A></B>()</CODE>
<BR>
Returns the genre of this mp3 if set and the empty string if not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getMPEGChannelMode()">getMPEGChannelMode</A></B>()</CODE>
<BR>
Return the channel mode of the mpeg.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getMPEGEmphasis()">getMPEGEmphasis</A></B>()</CODE>
<BR>
Returns the emphasis of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getMPEGLayer()">getMPEGLayer</A></B>()</CODE>
<BR>
Returns a string specifying the layer of the mpeg.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getMPEGVersion()">getMPEGVersion</A></B>()</CODE>
<BR>
Returns a string specifying the version of the mpeg.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getOriginalArtist()">getOriginalArtist</A></B>()</CODE>
<BR>
Returns the original artist of this mp3 if set and the empty string if not (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getParent()">getParent</A></B>()</CODE>
<BR>
Returns the parent directory of this MP3File.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getPath()">getPath</A></B>()</CODE>
<BR>
Return the absolute path of this MP3File.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getPlayingTime()">getPlayingTime</A></B>()</CODE>
<BR>
Returns the length (in seconds) of the playing time of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getPlayingTimeString()">getPlayingTimeString</A></B>()</CODE>
<BR>
Return a formatted version of the getPlayingTime method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getSampleRate()">getSampleRate</A></B>()</CODE>
<BR>
Returns the sample rate of this mp3 in Hz.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getTaggingType()">getTaggingType</A></B>()</CODE>
<BR>
Returns the currently set tagging type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getTitle()">getTitle</A></B>()</CODE>
<BR>
Returns the title of this mp3 if set and the empty string if not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getTrack()">getTrack</A></B>()</CODE>
<BR>
Returns the track of this mp3 if set and the empty string if not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getUserDefinedURL()">getUserDefinedURL</A></B>()</CODE>
<BR>
Returns the user defined url of this mp3 if set and the empty string if not (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -