1 /*
2 * Copyright 2007-2008 Medsea Business Solutions S.L.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package eu.medsea.mimeutil.detector;
17
18 import java.util.List;
19
20 /**
21 * This exception is thrown if while parsing the magic.mime files an invalid un-parsable entry is found
22 * @author Steven McArdle
23 */
24 class InvalidMagicMimeEntryException extends RuntimeException {
25
26 private static final long serialVersionUID = -6705937358834408523L;
27
28 public InvalidMagicMimeEntryException() {
29 super("Invalid Magic Mime Entry: Unknown entry");
30 }
31
32 public InvalidMagicMimeEntryException(List mimeMagicEntry) {
33 super("Invalid Magic Mime Entry: " + mimeMagicEntry.toString());
34 }
35
36 public InvalidMagicMimeEntryException(List mimeMagicEntry, Throwable t) {
37 super("Invalid Magic Mime Entry: " + mimeMagicEntry.toString(), t);
38 }
39
40 public InvalidMagicMimeEntryException(Throwable t) {
41 super(t);
42 }
43
44 public InvalidMagicMimeEntryException(String message, Throwable t) {
45 super(message, t);
46 }
47 }