1 | package org.farng.mp3; |
2 | |
3 | import java.io.ObjectInputStream; |
4 | import java.io.ObjectOutputStream; |
5 | |
6 | /** |
7 | * Thrown if the tag or MP3 Frame Header isn't found. This is different from the <code>InvalidTagException</code>. Each |
8 | * tag (or MP3 Frame Header) has an ID string or some way saying that it simply exists. If this string is missing, |
9 | * <code>TagNotFoundException</code> is thrown. If the ID string exists, then any other error while reading throws an |
10 | * <code>InvalidTagException</code>. |
11 | * |
12 | * @author Eric Farng |
13 | * @version $Revision: 1.1 $ |
14 | */ |
15 | public class TagNotFoundException extends TagException { |
16 | |
17 | /** |
18 | * Creates a new TagNotFoundException object. |
19 | */ |
20 | public TagNotFoundException() { |
21 | super(); |
22 | } |
23 | |
24 | /** |
25 | * Creates a new TagNotFoundException object. |
26 | */ |
27 | public TagNotFoundException(final Throwable exception) { |
28 | super(exception); |
29 | } |
30 | |
31 | /** |
32 | * Creates a new TagNotFoundException object. |
33 | * |
34 | * @param message the detail message. |
35 | */ |
36 | public TagNotFoundException(final String message) { |
37 | super(message); |
38 | } |
39 | |
40 | /** |
41 | * Creates a new TagNotFoundException object. |
42 | */ |
43 | public TagNotFoundException(final String message, final Throwable exception) { |
44 | super(message, exception); |
45 | } |
46 | |
47 | private void writeObject(final ObjectOutputStream out) { |
48 | throw new UnsupportedOperationException("Cannot write to Output Stream: " + out.toString()); |
49 | } |
50 | |
51 | private void readObject(final ObjectInputStream in) { |
52 | throw new UnsupportedOperationException("Cannot read from Input Stream: " + in.toString()); |
53 | } |
54 | } |