📄 mp3file.html
字号:
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#getYear()">getYear</A></B>()</CODE>
<BR>
Returns the year 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> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#id3v1Exists()">id3v1Exists</A></B>()</CODE>
<BR>
Returns true if an id3v1 tag currently exists.</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#id3v2Exists()">id3v2Exists</A></B>()</CODE>
<BR>
Returns true if an id3v2 tag currently exists.</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#isMP3()">isMP3</A></B>()</CODE>
<BR>
Returns true if this file is an mp3.</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#isMPEGCopyrighted()">isMPEGCopyrighted</A></B>()</CODE>
<BR>
Returns true if this mpeg is copyrighted.</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#isMPEGOriginal()">isMPEGOriginal</A></B>()</CODE>
<BR>
Returns true if this mpeg is the original.</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#isMPEGProtected()">isMPEGProtected</A></B>()</CODE>
<BR>
Returns true if this mpeg is protected by CRC.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#removeTags(int)">removeTags</A></B>(int type)</CODE>
<BR>
Removes id3 tags from the file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setAlbum(java.lang.String)">setAlbum</A></B>(java.lang.String album)</CODE>
<BR>
Set the album of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setArtist(java.lang.String)">setArtist</A></B>(java.lang.String artist)</CODE>
<BR>
Set the artist of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setComment(java.lang.String)">setComment</A></B>(java.lang.String comment)</CODE>
<BR>
Add a comment to this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setComposer(java.lang.String)">setComposer</A></B>(java.lang.String composer)</CODE>
<BR>
Set the composer of this mp3 (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setCopyrightInfo(java.lang.String)">setCopyrightInfo</A></B>(java.lang.String copyright)</CODE>
<BR>
Add some copyright information to this mp3 (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setEncodedBy(java.lang.String)">setEncodedBy</A></B>(java.lang.String encBy)</CODE>
<BR>
Set who encoded the mp3 (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setFrameData(java.lang.String, byte[])">setFrameData</A></B>(java.lang.String id, byte[] data)</CODE>
<BR>
Set the data of 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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setGenre(java.lang.String)">setGenre</A></B>(java.lang.String genre)</CODE>
<BR>
Set the genre of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setOriginalArtist(java.lang.String)">setOriginalArtist</A></B>(java.lang.String artist)</CODE>
<BR>
Set the original artist of this mp3 (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setTaggingType(int)">setTaggingType</A></B>(int newType)</CODE>
<BR>
Set the tagging type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setTextFrame(java.lang.String, java.lang.String)">setTextFrame</A></B>(java.lang.String id, java.lang.String data)</CODE>
<BR>
Set the text of the text 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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setTitle(java.lang.String)">setTitle</A></B>(java.lang.String title)</CODE>
<BR>
Set the title of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setTrack(int)">setTrack</A></B>(int track)</CODE>
<BR>
Set the track number of this mp3.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setUserDefinedText(java.lang.String, java.lang.String)">setUserDefinedText</A></B>(java.lang.String desc, java.lang.String text)</CODE>
<BR>
Add a field of miscellaneous text (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setUserDefinedURL(java.lang.String, java.lang.String)">setUserDefinedURL</A></B>(java.lang.String desc, java.lang.String url)</CODE>
<BR>
Add a link to this mp3 (id3v2 only).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#setYear(java.lang.String)">setYear</A></B>(java.lang.String year)</CODE>
<BR>
Set the year 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#toString()">toString</A></B>()</CODE>
<BR>
Return a string representation of this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../helliker/id3/MP3File.html#writeTags()">writeTags</A></B>()</CODE>
<BR>
Writes the current state of the id3 tags to the file.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="BOTH_TAGS"><!-- --></A><H3>
BOTH_TAGS</H3>
<PRE>
public static final int <B>BOTH_TAGS</B></PRE>
<DL>
<DD>Write ID3v1 and ID3v2 tags whether or not they exist. Precedence for reading will be given to id3v2 tags.</DL>
<HR>
<A NAME="ID3V2_ONLY"><!-- --></A><H3>
ID3V2_ONLY</H3>
<PRE>
public static final int <B>ID3V2_ONLY</B></PRE>
<DL>
<DD>Write and read from ID3v2 tags only. An ID3v2 tag will be created if an attempt is made to write.</DL>
<HR>
<A NAME="ID3V1_ONLY"><!-- --></A><H3>
ID3V1_ONLY</H3>
<PRE>
public static final int <B>ID3V1_ONLY</B></PRE>
<DL>
<DD>Write and read from ID3v1 tags only. An ID3v1 tag will be created if an attempt is made to write.</DL>
<HR>
<A NAME="NO_TAGS"><!-- --></A><H3>
NO_TAGS</H3>
<PRE>
public static final int <B>NO_TAGS</B></PRE>
<DL>
<DD>Do not write or read from any id3 tags.</DL>
<HR>
<A NAME="EXISTING_TAGS_ONLY"><!-- --></A><H3>
EXISTING_TAGS_ONLY</H3>
<PRE>
public static final int <B>EXISTING_TAGS_ONLY</B></PRE>
<DL>
<DD>Only write and read tags that already exist. Existing tags can be updated but new tags will not be created.</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="MP3File(java.lang.String)"><!-- --></A><H3>
MP3File</H3>
<PRE>
public <B>MP3File</B>(java.lang.String fn) throws java.io.FileNotFoundException, <A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A>, java.io.IOException, <A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></PRE>
<DL>
<DD>Create an MP3File object that reads and writes to the file with the filename fn. This assumes that you only want to read and write id3 tags that already exist in the file.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fn</CODE> - the filename of the mp3<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A></CODE> - if an error occurs<DD><CODE>java.io.IOException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></CODE> - if an error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="MP3File(java.io.File)"><!-- --></A><H3>
MP3File</H3>
<PRE>
public <B>MP3File</B>(java.io.File mp3) throws java.io.FileNotFoundException, <A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A>, java.io.IOException, <A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></PRE>
<DL>
<DD>Create an MP3File object that reads and writes to the specified file. This assumes that you only want to read and write id3 tags tha already exist in the file.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mp3</CODE> - the file of the mp3<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A></CODE> - if an error occurs<DD><CODE>java.io.IOException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></CODE> - if an error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="MP3File(java.lang.String, int)"><!-- --></A><H3>
MP3File</H3>
<PRE>
public <B>MP3File</B>(java.lang.String fn, int tagType) throws java.io.FileNotFoundException, <A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A>, java.io.IOException, <A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></PRE>
<DL>
<DD>Create an MP3File object that reads and writes to the file with the filename fn. The id3 tags that are read from and written are dependant upon the tagType argument. This could be either: BOTH_TAGS, ID3V2_ONLY, ID3V1_ONLY, NO_TAGS, or EXISTING_TAGS_ONLY.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fn</CODE> - the filename of the mp3<DD><CODE>tagType</CODE> - determines what type of tags to write and read from<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A></CODE> - if an error occurs<DD><CODE>java.io.IOException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></CODE> - if an error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="MP3File(java.io.File, int)"><!-- --></A><H3>
MP3File</H3>
<PRE>
public <B>MP3File</B>(java.io.File mp3, int tagType) throws java.io.FileNotFoundException, <A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A>, java.io.IOException, <A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></PRE>
<DL>
<DD>Create and MP3File object that reads and writes to the specified file. The id3 tags that are read from and written are dependant upon the tagType argument. This could be either: BOTH_TAGS, ID3V2_ONLY, ID3V1_ONLY, NO_TAGS, or EXISTING_TAGS_ONLY.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mp3</CODE> - the file of the mp3<DD><CODE>tagType</CODE> - determines what type of tags to write and read from<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/NoMPEGFramesException.html">NoMPEGFramesException</A></CODE> - if an error occurs<DD><CODE>java.io.IOException</CODE> - if an error occurs<DD><CODE><A HREF="../../helliker/id3/ID3v2FormatException.html">ID3v2FormatException</A></CODE> - if an error occurs</DL>
</DD>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getPlayingTime()"><!-- --></A><H3>
getPlayingTime</H3>
<PRE>
public long <B>getPlayingTime</B>()</PRE>
<DL>
<DD>Returns the length (in seconds) of the playing time of this mp3. This will not return an accurate value for VBR files.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the playing time (in seconds) of this mp3</DL>
</DD>
</DL>
<HR>
<A NAME="getPlayingTimeString()"><!-- --></A><H3>
getPlayingTimeString</H3>
<PRE>
public java.lang.String <B>getPlayingTimeString</B>()</PRE>
<DL>
<DD>Return a formatted version of the getPlayingTime method. The string will be formated "m:ss" where 'm' is minutes and 'ss' is seconds.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a formatted version of the getPlayingTime method</DL>
</DD>
</DL>
<HR>
<A NAME="getPath()"><!-- --></A><H3>
getPath</H3>
<PRE>
public java.lang.String <B>getPath</B>()</PRE>
<DL>
<DD>Return the absolute path of this MP3File.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the absolute path of this MP3File</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -