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 'Original release time' frame contains a timestamp describing<br> |
11 | * <p/> |
12 | * when the original recording of the audio was released. Timestamp<br> format is described in |
13 | * the ID3v2 structure document [ID3v2-strct].</p> |
14 | * |
15 | * @author Eric Farng |
16 | * @version $Revision: 1.4 $ |
17 | */ |
18 | public class FrameBodyTDOR extends AbstractFrameBodyTextInformation { |
19 | |
20 | /** |
21 | * Creates a new FrameBodyTDOR object. |
22 | */ |
23 | public FrameBodyTDOR() { |
24 | super(); |
25 | } |
26 | |
27 | /** |
28 | * Creates a new FrameBodyTDOR object. |
29 | */ |
30 | public FrameBodyTDOR(final FrameBodyTDOR body) { |
31 | super(body); |
32 | } |
33 | |
34 | /** |
35 | * Creates a new FrameBodyTDOR object. |
36 | */ |
37 | public FrameBodyTDOR(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 FrameBodyTDOR object. |
44 | */ |
45 | public FrameBodyTDOR(final RandomAccessFile file) throws java.io.IOException, InvalidTagException { |
46 | super(file); |
47 | } |
48 | |
49 | public String getIdentifier() { |
50 | return "TDOR"; |
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 | } |