1 | /**************************************************************** |
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one * |
---|
3 | * or more contributor license agreements. See the NOTICE file * |
---|
4 | * distributed with this work for additional information * |
---|
5 | * regarding copyright ownership. The ASF licenses this file * |
---|
6 | * to you under the Apache License, Version 2.0 (the * |
---|
7 | * "License"); you may not use this file except in compliance * |
---|
8 | * with the License. You may obtain a copy of the License at * |
---|
9 | * * |
---|
10 | * http://www.apache.org/licenses/LICENSE-2.0 * |
---|
11 | * * |
---|
12 | * Unless required by applicable law or agreed to in writing, * |
---|
13 | * software distributed under the License is distributed on an * |
---|
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * |
---|
15 | * KIND, either express or implied. See the License for the * |
---|
16 | * specific language governing permissions and limitations * |
---|
17 | * under the License. * |
---|
18 | ****************************************************************/ |
---|
19 | |
---|
20 | package org.apache.james.mime4j.parser; |
---|
21 | |
---|
22 | import org.apache.james.mime4j.MimeException; |
---|
23 | import org.apache.james.mime4j.stream.BodyDescriptor; |
---|
24 | import org.apache.james.mime4j.stream.RawField; |
---|
25 | |
---|
26 | import org.apache.james.mime4j.io.LineNumberInputStream; |
---|
27 | |
---|
28 | import java.io.IOException; |
---|
29 | import java.io.InputStream; |
---|
30 | |
---|
31 | /** |
---|
32 | * Abstract <code>ContentHandler</code> with default implementations of all |
---|
33 | * the methods of the <code>ContentHandler</code> interface. |
---|
34 | * |
---|
35 | * The default is to do nothing. |
---|
36 | */ |
---|
37 | public abstract class AbstractContentHandler implements ContentHandlerEx { |
---|
38 | |
---|
39 | public void endMultipart() throws MimeException { |
---|
40 | } |
---|
41 | |
---|
42 | public void startMultipart(BodyDescriptor bd) throws MimeException { |
---|
43 | } |
---|
44 | |
---|
45 | public void body(BodyDescriptor bd, InputStream is) |
---|
46 | throws MimeException, IOException { |
---|
47 | } |
---|
48 | |
---|
49 | public void endBodyPart() throws MimeException { |
---|
50 | } |
---|
51 | |
---|
52 | public void endHeader() throws MimeException { |
---|
53 | } |
---|
54 | |
---|
55 | public void endMessage() throws MimeException { |
---|
56 | } |
---|
57 | |
---|
58 | public void epilogue(InputStream is) throws MimeException, IOException { |
---|
59 | } |
---|
60 | |
---|
61 | public void field(RawField field) throws MimeException { |
---|
62 | } |
---|
63 | |
---|
64 | public void preamble(InputStream is) throws MimeException, IOException { |
---|
65 | } |
---|
66 | |
---|
67 | public void startBodyPart() throws MimeException { |
---|
68 | } |
---|
69 | |
---|
70 | public void startBodyPart(LineNumberInputStream.Entity entity) throws MimeException { |
---|
71 | startBodyPart(); |
---|
72 | } |
---|
73 | |
---|
74 | public void startHeader() throws MimeException { |
---|
75 | } |
---|
76 | |
---|
77 | public void startMessage() throws MimeException { |
---|
78 | } |
---|
79 | |
---|
80 | public void startMessage(LineNumberInputStream.Entity entity) throws MimeException { |
---|
81 | startMessage(); |
---|
82 | } |
---|
83 | |
---|
84 | public void raw(InputStream is) throws MimeException, IOException { |
---|
85 | } |
---|
86 | |
---|
87 | } |
---|