本文整理汇总了Java中org.jaudiotagger.tag.id3.ID3v1Tag.write方法的典型用法代码示例。如果您正苦于以下问题:Java ID3v1Tag.write方法的具体用法?Java ID3v1Tag.write怎么用?Java ID3v1Tag.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jaudiotagger.tag.id3.ID3v1Tag
的用法示例。
在下文中一共展示了ID3v1Tag.write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import org.jaudiotagger.tag.id3.ID3v1Tag; //导入方法依赖的package包/类
/**
* @param file
* @throws IOException
*/
public void write(RandomAccessFile file) throws IOException
{
String str;
int offset;
byte[] buffer;
ID3v1Tag id3v1tag;
id3v1tag = null;
delete(file);
file.seek(file.length());
buffer = new byte[lyric.length() + 11 + 9];
str = "LYRICSBEGIN";
for (int i = 0; i < str.length(); i++)
{
buffer[i] = (byte) str.charAt(i);
}
offset = str.length();
str = ID3Tags.truncate(lyric, 5100);
for (int i = 0; i < str.length(); i++)
{
buffer[i + offset] = (byte) str.charAt(i);
}
offset += str.length();
str = "LYRICSEND";
for (int i = 0; i < str.length(); i++)
{
buffer[i + offset] = (byte) str.charAt(i);
}
offset += str.length();
file.write(buffer, 0, offset);
if (id3v1tag != null)
{
id3v1tag.write(file);
}
}
示例2: write
import org.jaudiotagger.tag.id3.ID3v1Tag; //导入方法依赖的package包/类
/**
* @param file
* @throws IOException
*/
public void write(RandomAccessFile file) throws IOException {
String str;
int offset;
byte[] buffer;
ID3v1Tag id3v1tag;
id3v1tag = null;
delete(file);
file.seek(file.length());
buffer = new byte[lyric.length() + 11 + 9];
str = "LYRICSBEGIN";
for (int i = 0; i < str.length(); i++) {
buffer[i] = (byte) str.charAt(i);
}
offset = str.length();
str = ID3Tags.truncate(lyric, 5100);
for (int i = 0; i < str.length(); i++) {
buffer[i + offset] = (byte) str.charAt(i);
}
offset += str.length();
str = "LYRICSEND";
for (int i = 0; i < str.length(); i++) {
buffer[i + offset] = (byte) str.charAt(i);
}
offset += str.length();
file.write(buffer, 0, offset);
if (id3v1tag != null) {
id3v1tag.write(file);
}
}
示例3: write
import org.jaudiotagger.tag.id3.ID3v1Tag; //导入方法依赖的package包/类
public void write(RandomAccessFile file) throws IOException {
String str;
int offset;
byte[] buffer;
ID3v1Tag id3v1tag;
id3v1tag = null;
delete(file);
file.seek(file.length());
buffer = new byte[lyric.length() + 11 + 9];
str = "LYRICSBEGIN";
for (int i = 0; i < str.length(); i++) {
buffer[i] = (byte) str.charAt(i);
}
offset = str.length();
str = ID3Tags.truncate(lyric, 5100);
for (int i = 0; i < str.length(); i++) {
buffer[i + offset] = (byte) str.charAt(i);
}
offset += str.length();
str = "LYRICSEND";
for (int i = 0; i < str.length(); i++) {
buffer[i + offset] = (byte) str.charAt(i);
}
offset += str.length();
file.write(buffer, 0, offset);
if (id3v1tag != null) {
id3v1tag.write(file);
}
}