1 | package org.farng.mp3.id3; |
2 | |
3 | import org.farng.mp3.InvalidTagException; |
4 | import org.farng.mp3.object.ObjectNumberFixedLength; |
5 | |
6 | import java.io.IOException; |
7 | import java.io.RandomAccessFile; |
8 | |
9 | /** |
10 | * <h3>4.29. Seek frame</h3> |
11 | * <p/> |
12 | * <p> This frame indicates where other tags in a file/stream can be found.<br> The 'minimum |
13 | * offset to next tag' is calculated from the end of this<br> tag to the beginning of the next. There may |
14 | * only be one 'seek frame'<br> in a tag.</p> |
15 | * <p/> |
16 | * <p> <Header for 'Seek frame', ID: "SEEK"><br> Minimum offset to next |
17 | * tag $xx xx xx xx<br> </p> |
18 | * |
19 | * @author Eric Farng |
20 | * @version $Revision: 1.4 $ |
21 | */ |
22 | public class FrameBodySEEK extends AbstractID3v2FrameBody { |
23 | |
24 | /** |
25 | * Creates a new FrameBodySEEK object. |
26 | */ |
27 | public FrameBodySEEK() { |
28 | super(); |
29 | } |
30 | |
31 | /** |
32 | * Creates a new FrameBodySEEK object. |
33 | */ |
34 | public FrameBodySEEK(final int minOffsetToNextTag) { |
35 | setObject("Minimum Offset to Next Tag", new Integer(minOffsetToNextTag)); |
36 | } |
37 | |
38 | /** |
39 | * Creates a new FrameBodySEEK object. |
40 | */ |
41 | public FrameBodySEEK(final FrameBodySEEK body) { |
42 | super(body); |
43 | } |
44 | |
45 | /** |
46 | * Creates a new FrameBodySEEK object. |
47 | */ |
48 | public FrameBodySEEK(final RandomAccessFile file) throws IOException, InvalidTagException { |
49 | this.read(file); |
50 | } |
51 | |
52 | public String getIdentifier() { |
53 | return "SEEK"; |
54 | } |
55 | |
56 | protected void setupObjectList() { |
57 | appendToObjectList(new ObjectNumberFixedLength("Minimum Offset to Next Tag", 4)); |
58 | } |
59 | } |