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;
21 
22 import java.io.IOException;
23 import java.io.InputStream;
24 
25 /**
26  * Abstract <code>ContentHandler</code> with default implementations of all
27  * the methods of the <code>ContentHandler</code> interface.
28  *
29  * The default is to todo nothing.
30  *
31  *
32  * @version $Id: AbstractContentHandler.java,v 1.3 2004/10/02 12:41:10 ntherning Exp $
33  */
34 public abstract class AbstractContentHandler implements ContentHandler {
35 
36     /**
37      * @see org.apache.james.mime4j.ContentHandler#endMultipart()
38      */
endMultipart()39     public void endMultipart() {
40     }
41 
42     /**
43      * @see org.apache.james.mime4j.ContentHandler#startMultipart(org.apache.james.mime4j.BodyDescriptor)
44      */
startMultipart(BodyDescriptor bd)45     public void startMultipart(BodyDescriptor bd) {
46     }
47 
48     /**
49      * @see org.apache.james.mime4j.ContentHandler#body(org.apache.james.mime4j.BodyDescriptor, java.io.InputStream)
50      */
body(BodyDescriptor bd, InputStream is)51     public void body(BodyDescriptor bd, InputStream is) throws IOException {
52     }
53 
54     /**
55      * @see org.apache.james.mime4j.ContentHandler#endBodyPart()
56      */
endBodyPart()57     public void endBodyPart() {
58     }
59 
60     /**
61      * @see org.apache.james.mime4j.ContentHandler#endHeader()
62      */
endHeader()63     public void endHeader() {
64     }
65 
66     /**
67      * @see org.apache.james.mime4j.ContentHandler#endMessage()
68      */
endMessage()69     public void endMessage() {
70     }
71 
72     /**
73      * @see org.apache.james.mime4j.ContentHandler#epilogue(java.io.InputStream)
74      */
epilogue(InputStream is)75     public void epilogue(InputStream is) throws IOException {
76     }
77 
78     /**
79      * @see org.apache.james.mime4j.ContentHandler#field(java.lang.String)
80      */
field(String fieldData)81     public void field(String fieldData) {
82     }
83 
84     /**
85      * @see org.apache.james.mime4j.ContentHandler#preamble(java.io.InputStream)
86      */
preamble(InputStream is)87     public void preamble(InputStream is) throws IOException {
88     }
89 
90     /**
91      * @see org.apache.james.mime4j.ContentHandler#startBodyPart()
92      */
startBodyPart()93     public void startBodyPart() {
94     }
95 
96     /**
97      * @see org.apache.james.mime4j.ContentHandler#startHeader()
98      */
startHeader()99     public void startHeader() {
100     }
101 
102     /**
103      * @see org.apache.james.mime4j.ContentHandler#startMessage()
104      */
startMessage()105     public void startMessage() {
106     }
107 
108     /**
109      * @see org.apache.james.mime4j.ContentHandler#raw(java.io.InputStream)
110      */
raw(InputStream is)111     public void raw(InputStream is) throws IOException {
112     }
113 }
114