1 | package org.farng.mp3.id3; |
2 | |
3 | import org.farng.mp3.InvalidTagException; |
4 | import org.farng.mp3.object.ObjectNumberHashMap; |
5 | import org.farng.mp3.object.ObjectStringDateTime; |
6 | |
7 | import java.io.RandomAccessFile; |
8 | |
9 | /** |
10 | * The 'Release time' frame contains a timestamp describing when the<br> |
11 | * <p/> |
12 | * audio was first released. Timestamp format is described in the ID3v2<br> structure document |
13 | * [ID3v2-strct].</p> |
14 | * |
15 | * @author Eric Farng |
16 | * @version $Revision: 1.4 $ |
17 | */ |
18 | public class FrameBodyTDRL extends AbstractFrameBodyTextInformation { |
19 | |
20 | /** |
21 | * Creates a new FrameBodyTDRL object. |
22 | */ |
23 | public FrameBodyTDRL() { |
24 | super(); |
25 | } |
26 | |
27 | /** |
28 | * Creates a new FrameBodyTDRL object. |
29 | */ |
30 | public FrameBodyTDRL(final FrameBodyTDRL body) { |
31 | super(body); |
32 | } |
33 | |
34 | /** |
35 | * Creates a new FrameBodyTDRL object. |
36 | */ |
37 | public FrameBodyTDRL(final byte textEncoding, final String text) { |
38 | setObject(ObjectNumberHashMap.TEXT_ENCODING, new Byte(textEncoding)); |
39 | setObject("Date Time", text); |
40 | } |
41 | |
42 | /** |
43 | * Creates a new FrameBodyTDRL object. |
44 | */ |
45 | public FrameBodyTDRL(final RandomAccessFile file) throws java.io.IOException, InvalidTagException { |
46 | super(file); |
47 | } |
48 | |
49 | public String getIdentifier() { |
50 | return "TDRL"; |
51 | } |
52 | |
53 | public void setText(final String text) { |
54 | setObject("Date Time", text); |
55 | } |
56 | |
57 | public String getText() { |
58 | return (String) getObject("Date Time"); |
59 | } |
60 | |
61 | protected void setupObjectList() { |
62 | appendToObjectList(new ObjectNumberHashMap(ObjectNumberHashMap.TEXT_ENCODING, 1)); |
63 | appendToObjectList(new ObjectStringDateTime("Date Time")); |
64 | } |
65 | } |