| 1 | package org.farng.mp3; |
| 2 | |
| 3 | import java.io.ObjectInputStream; |
| 4 | import java.io.ObjectOutputStream; |
| 5 | |
| 6 | /** |
| 7 | * An <code>InvalidTagException</code> is thrown if a parse error occurs while a tag is being read from a file. This is |
| 8 | * different from a <code>TagNotFoundException</code>. Each tag (or MP3 Frame Header) has an ID string or some way |
| 9 | * saying that it simply exists. If this string is missing, <code>TagNotFoundException</code> is thrown. If the ID |
| 10 | * string exists, then any other error while reading throws an <code>InvalidTagException</code>. |
| 11 | * |
| 12 | * @author Eric Farng |
| 13 | * @version $Revision: 1.1 $ |
| 14 | */ |
| 15 | public class InvalidTagException extends TagException { |
| 16 | |
| 17 | /** |
| 18 | * Creates a new InvalidTagException object. |
| 19 | */ |
| 20 | public InvalidTagException() { |
| 21 | super(); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Creates a new InvalidTagException object. |
| 26 | */ |
| 27 | public InvalidTagException(final Throwable exception) { |
| 28 | super(exception); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Creates a new InvalidTagException object. |
| 33 | * |
| 34 | * @param message the detail message. |
| 35 | */ |
| 36 | public InvalidTagException(final String message) { |
| 37 | super(message); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Creates a new InvalidTagException object. |
| 42 | */ |
| 43 | public InvalidTagException(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 | } |