org.farng.mp3.id3.FrameBodyTDRC Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jid3lib Show documentation
Show all versions of jid3lib Show documentation
This library reads song information, such as song title, artist, and album, from an MP3 file. It supports ID3v1, ID3v1.1, Lyrics3v1, Lyrics3v2, ID3v2.2, ID3v2.3, and ID3v2.4 tags. MP3 Frame Headers can also be read. There is a FilenameTag, a ID3v2.4 tag that is intelligently derived from the file name. It contains tag synchronization utilities, multiple save options, and easy tag conversion methods.
The newest version!
package org.farng.mp3.id3;
import org.farng.mp3.InvalidTagException;
import org.farng.mp3.object.ObjectNumberHashMap;
import org.farng.mp3.object.ObjectStringDateTime;
import java.io.RandomAccessFile;
/**
* The 'Recording time' frame contains a timestamp describing when the
*
* audio was recorded. Timestamp format is described in the ID3v2
structure document
* [ID3v2-strct].
*
* @author Eric Farng
* @version $Revision: 1.4 $
*/
public class FrameBodyTDRC extends AbstractFrameBodyTextInformation {
/**
* Creates a new FrameBodyTDRC object.
*/
public FrameBodyTDRC() {
super();
}
/**
* Creates a new FrameBodyTDRC object.
*/
public FrameBodyTDRC(final FrameBodyTDRC body) {
super(body);
}
/**
* Creates a new FrameBodyTDRC object.
*/
public FrameBodyTDRC(final byte textEncoding, final String text) {
setObject(ObjectNumberHashMap.TEXT_ENCODING, new Byte(textEncoding));
setObject("Date Time", text);
}
/**
* Creates a new FrameBodyTDRC object.
*/
public FrameBodyTDRC(final RandomAccessFile file) throws java.io.IOException, InvalidTagException {
super(file);
}
public String getIdentifier() {
return "TDRC";
}
public void setText(final String text) {
setObject("Date Time", text);
}
public String getText() {
return (String) getObject("Date Time");
}
protected void setupObjectList() {
appendToObjectList(new ObjectNumberHashMap(ObjectNumberHashMap.TEXT_ENCODING, 1));
appendToObjectList(new ObjectStringDateTime("Date Time"));
}
}