📄 id3v1tag.html
字号:
</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="writeTag()"><!-- --></A><H3>
writeTag</H3>
<PRE>
public void <B>writeTag</B>() throws java.io.FileNotFoundException, java.io.IOException</PRE>
<DL>
<DD>Writes the information in this tag to the file specified in the constructor. If a tag does not exist, one will be created. If a tag already exists, it will be overwritten.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if an error occurs<DD><CODE>java.io.IOException</CODE> - if an error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="removeTag()"><!-- --></A><H3>
removeTag</H3>
<PRE>
public void <B>removeTag</B>() throws java.io.FileNotFoundException, java.io.IOException</PRE>
<DL>
<DD>Removes the id3v1 tag from the file specified in the constructor<DD><DL>
<DT><B>Returns:</B><DD>true if the tag was removed successfully<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if an error occurs<DD><CODE>java.io.IOException</CODE> - if an error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="getGenreString()"><!-- --></A><H3>
getGenreString</H3>
<PRE>
public java.lang.String <B>getGenreString</B>()</PRE>
<DL>
<DD>Return the genre name based on the ID3/Nullsoft standards. If the genre value is not valid, null is returned.<DD><DL>
<DT><B>Returns:</B><DD>return the genre name or null if the genre value is not valid</DL>
</DD>
</DL>
<HR>
<A NAME="setGenreString(java.lang.String)"><!-- --></A><H3>
setGenreString</H3>
<PRE>
public boolean <B>setGenreString</B>(java.lang.String str)</PRE>
<DL>
<DD>Attempt to set the genre value of this tag from the string specified. The value returned is based on the ID3/Nullsoft standards. Returns true if a match is found in the table and false otherwise.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the string value of the genre to attempt to set<DT><B>Returns:</B><DD>true if a match is found, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="tagExists()"><!-- --></A><H3>
tagExists</H3>
<PRE>
public boolean <B>tagExists</B>()</PRE>
<DL>
<DD>Checks if a tag exists<DD><DL>
<DT><B>Returns:</B><DD>true if a tag exists</DL>
</DD>
</DL>
<HR>
<A NAME="getTitle()"><!-- --></A><H3>
getTitle</H3>
<PRE>
public java.lang.String <B>getTitle</B>()</PRE>
<DL>
<DD>Return the title field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the title field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setTitle(java.lang.String)"><!-- --></A><H3>
setTitle</H3>
<PRE>
public void <B>setTitle</B>(java.lang.String newTitle)</PRE>
<DL>
<DD>Set the title field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newTitle</CODE> - the title for the tag</DL>
</DD>
</DL>
<HR>
<A NAME="getArtist()"><!-- --></A><H3>
getArtist</H3>
<PRE>
public java.lang.String <B>getArtist</B>()</PRE>
<DL>
<DD>Return the artist field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the artist field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setArtist(java.lang.String)"><!-- --></A><H3>
setArtist</H3>
<PRE>
public void <B>setArtist</B>(java.lang.String newArtist)</PRE>
<DL>
<DD>Set the artist field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newArtist</CODE> - the artist for the tag</DL>
</DD>
</DL>
<HR>
<A NAME="getAlbum()"><!-- --></A><H3>
getAlbum</H3>
<PRE>
public java.lang.String <B>getAlbum</B>()</PRE>
<DL>
<DD>Return the album field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the album field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setAlbum(java.lang.String)"><!-- --></A><H3>
setAlbum</H3>
<PRE>
public void <B>setAlbum</B>(java.lang.String newAlbum)</PRE>
<DL>
<DD>Set the album field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newAlbum</CODE> - the album for the tag</DL>
</DD>
</DL>
<HR>
<A NAME="getYear()"><!-- --></A><H3>
getYear</H3>
<PRE>
public java.lang.String <B>getYear</B>()</PRE>
<DL>
<DD>Return the year field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the year field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setYear(java.lang.String)"><!-- --></A><H3>
setYear</H3>
<PRE>
public void <B>setYear</B>(java.lang.String newYear)</PRE>
<DL>
<DD>Set the year field of the tag. The maximum size of the String is 4. If the size exceeds the maximum size, the String will be truncated.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newYear</CODE> - the year for the tag</DL>
</DD>
</DL>
<HR>
<A NAME="getComment()"><!-- --></A><H3>
getComment</H3>
<PRE>
public java.lang.String <B>getComment</B>()</PRE>
<DL>
<DD>Return the comment field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the comment field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setComment(java.lang.String)"><!-- --></A><H3>
setComment</H3>
<PRE>
public void <B>setComment</B>(java.lang.String newComment)</PRE>
<DL>
<DD>Set the comment field of the tag. The maximum size of the String is 30. If the size exceeds the maximum size, the String will be truncated.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newComment</CODE> - the comment of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="getTrack()"><!-- --></A><H3>
getTrack</H3>
<PRE>
public int <B>getTrack</B>()</PRE>
<DL>
<DD>Return the track field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the track field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setTrack(int)"><!-- --></A><H3>
setTrack</H3>
<PRE>
public void <B>setTrack</B>(int newTrack)</PRE>
<DL>
<DD>Set the track field of the tag. The track number has to be between 0 and 255. If it is not, nothing will happen.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newTrack</CODE> - the track of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="getGenre()"><!-- --></A><H3>
getGenre</H3>
<PRE>
public int <B>getGenre</B>()</PRE>
<DL>
<DD>Return the genre field of the tag<DD><DL>
<DT><B>Returns:</B><DD>the genre field of the tag</DL>
</DD>
</DL>
<HR>
<A NAME="setGenre(int)"><!-- --></A><H3>
setGenre</H3>
<PRE>
public void <B>setGenre</B>(int newGenre) throws <A HREF="../../helliker/id3/ID3FieldDataException.html">ID3FieldDataException</A></PRE>
<DL>
<DD>Set the genre field of the tag. This probably should not be greater than 115, but supports values from 0-255.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newGenre</CODE> - the genre of the tag<DT><B>Throws:</B><DD><CODE><A HREF="../../helliker/id3/ID3FieldDataException.html">ID3FieldDataException</A></CODE> - if the value supplie is invalid</DL>
</DD>
</DL>
<HR>
<A NAME="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
public int <B>getSize</B>()</PRE>
<DL>
<DD>Return the size in bytes of the tag. This returns 128 if the tag exists and 0 otherwise.<DD><DL>
<DT><B>Returns:</B><DD>the size of the tag in bytes</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_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/ID3FieldDataException.html"><B>PREV CLASS</B></A>
<A HREF="../../helliker/id3/ID3v2ExtendedHeader.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="ID3v1Tag.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -