1 | package org.farng.mp3.id3; |
2 | |
3 | import org.farng.mp3.InvalidTagException; |
4 | import org.farng.mp3.object.ObjectStringSizeTerminated; |
5 | |
6 | import java.io.IOException; |
7 | import java.io.RandomAccessFile; |
8 | |
9 | /** |
10 | * All frames starting with "U" are the same structurally and subclass from here |
11 | * |
12 | * @author Eric Farng |
13 | * @version $Revision: 1.5 $ |
14 | */ |
15 | public abstract class AbstractFrameBodyUrlLink extends AbstractID3v2FrameBody { |
16 | |
17 | /** |
18 | * Creates a new FrameBodyUrlLink object. |
19 | */ |
20 | protected AbstractFrameBodyUrlLink() { |
21 | super(); |
22 | } |
23 | |
24 | /** |
25 | * Creates a new AbstractFrameBodyUrlLink object. |
26 | */ |
27 | protected AbstractFrameBodyUrlLink(final AbstractFrameBodyUrlLink body) { |
28 | super(body); |
29 | } |
30 | |
31 | /** |
32 | * Creates a new FrameBodyUrlLink object. |
33 | */ |
34 | protected AbstractFrameBodyUrlLink(final String urlLink) { |
35 | super(); |
36 | setObject("URL Link", urlLink); |
37 | } |
38 | |
39 | /** |
40 | * Creates a new FrameBodyUrlLink object. |
41 | */ |
42 | protected AbstractFrameBodyUrlLink(final RandomAccessFile file) throws IOException, InvalidTagException { |
43 | super(); |
44 | read(file); |
45 | } |
46 | |
47 | public String getBriefDescription() { |
48 | return getUrlLink(); |
49 | } |
50 | |
51 | public void setUrlLink(final String urlLink) { |
52 | setObject("URL Link", urlLink); |
53 | } |
54 | |
55 | public String getUrlLink() { |
56 | return (String) getObject("URL Link"); |
57 | } |
58 | |
59 | protected void setupObjectList() { |
60 | appendToObjectList(new ObjectStringSizeTerminated("URL Link")); |
61 | } |
62 | } |