Posted by ps2music on 06/21/06 21:54
Actually I've found my way by myself.
I'll share what I got:
// A SIMPLE SAMPLE
package ps2.mp3tests;
import java.io.IOException;
import org.jaudiotagger.audio.InvalidAudioFrameException;
import org.jaudiotagger.audio.ReadOnlyFileException;
import org.jaudiotagger.audio.mp3.MP3File;
import org.jaudiotagger.tag.TagException;
import org.jaudiotagger.tag.id3.ID3v1Tag;
public class Main {
public static void main(String[] args) throws IOException,
TagException, ReadOnlyFileException, InvalidAudioFrameException {
MP3File mp3=new MP3File("C:\\xr3\\1\\1 relax\\Kelly Clarkson -
Breakaway.mp3");
System.out.println("hasID3v1Tag "+mp3.hasID3v1Tag());
System.out.println("hasID3v2Tag "+mp3.hasID3v2Tag());
System.out.println("displayStructureAsPlainText
"+mp3.displayStructureAsPlainText());
ID3v1Tag tag=mp3.getID3v1Tag();
System.out.println("getComment "+tag.getComment());
}
}
// AND THE RESULTS
/*
hasID3v1Tag true
hasID3v2Tag true
displayStructureAsPlainText file:C:\xr3\1\1 relax\Kelly Clarkson -
Breakaway.mp3
tag:ID3v1.1.0
title:Breakaway
artist:Kelly Clarkson
album:soundtrack from Princess Diar
year:
comment:relax=4
track:1
genre:13
tag:ID3v2.30
duplicateBytes:0
duplicateFrameId:
emptyFrameBytes:0
fileReadSize:4342
invalidFrameBytes:1
header:
unsyncronisationr:false
extended:false
experimental:false
compression:false
crcdata:0
paddingsize:0
body:
frame:TIT2
frameSize:10
statusFlags:
typeTagAlterPreservation:0
typeFileAlterPreservation:0
typeReadOnly:0
encodingFlags:
compression:0
encryption:0
groupidentity:0
body:
TextEncoding:0
Text:Breakaway
frame:TRCK
frameSize:2
statusFlags:
typeTagAlterPreservation:0
typeFileAlterPreservation:0
typeReadOnly:0
encodingFlags:
compression:0
encryption:0
groupidentity:0
body:
TextEncoding:0
Text:1
frame:TCON
frameSize:5
statusFlags:
typeTagAlterPreservation:0
typeFileAlterPreservation:0
typeReadOnly:0
encodingFlags:
compression:0
encryption:0
groupidentity:0
body:
TextEncoding:0
Text:(13)
frame:TALB
frameSize:35
statusFlags:
typeTagAlterPreservation:0
typeFileAlterPreservation:0
typeReadOnly:0
encodingFlags:
compression:0
encryption:0
groupidentity:0
body:
TextEncoding:0
Text:soundtrack from Princess Diaries 2
frame:PRIV
frameSize:39
statusFlags:
typeTagAlterPreservation:0
typeFileAlterPreservation:0
typeReadOnly:0
encodingFlags:
compression:0
encryption:0
groupidentity:0
body:
Owner:WM/MediaClassPrimaryID
Data:[B@d1e604
frame:PRIV
frameSize:41
statusFlags:
typeTagAlterPreservation:0
typeFileAlterPreservation:0
typeReadOnly:0
encodingFlags:
compression:0
encryption:0
groupidentity:0
body:
Owner:WM/MediaClassSecondaryID
Data:[B@54172f
getComment relax=4
*/
That's it!
Paulo Silvestre Schmitt.
ps2music escreveu:
> Does anybody has a sample java code demonstrating how to use the ID3
> manipulator jaudiotagger?
>
> I think it is a new package because there is a lack of documentation on
> the Internet about this project.
>
> Thanks in advance.
>
> Paulo Silvestre Schmitt.
[Back to original message]
|