001 /**************************************************************** 002 * Licensed to the Apache Software Foundation (ASF) under one * 003 * or more contributor license agreements. See the NOTICE file * 004 * distributed with this work for additional information * 005 * regarding copyright ownership. The ASF licenses this file * 006 * to you under the Apache License, Version 2.0 (the * 007 * "License"); you may not use this file except in compliance * 008 * with the License. You may obtain a copy of the License at * 009 * * 010 * http://www.apache.org/licenses/LICENSE-2.0 * 011 * * 012 * Unless required by applicable law or agreed to in writing, * 013 * software distributed under the License is distributed on an * 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 015 * KIND, either express or implied. See the License for the * 016 * specific language governing permissions and limitations * 017 * under the License. * 018 ****************************************************************/ 019 020 package org.apache.james.mime4j.parser; 021 022 import org.apache.james.mime4j.MimeException; 023 import org.apache.james.mime4j.descriptor.BodyDescriptor; 024 025 import java.io.IOException; 026 import java.io.InputStream; 027 028 /** 029 * Abstract <code>ContentHandler</code> with default implementations of all 030 * the methods of the <code>ContentHandler</code> interface. 031 * 032 * The default is to do nothing. 033 */ 034 public abstract class AbstractContentHandler implements ContentHandler { 035 036 /** 037 * @see org.apache.james.mime4j.parser.ContentHandler#endMultipart() 038 */ 039 public void endMultipart() throws MimeException { 040 } 041 042 /** 043 * @see org.apache.james.mime4j.parser.ContentHandler#startMultipart(org.apache.james.mime4j.descriptor.BodyDescriptor) 044 */ 045 public void startMultipart(BodyDescriptor bd) throws MimeException { 046 } 047 048 /** 049 * @see org.apache.james.mime4j.parser.ContentHandler#body(org.apache.james.mime4j.descriptor.BodyDescriptor, java.io.InputStream) 050 */ 051 public void body(BodyDescriptor bd, InputStream is) 052 throws MimeException, IOException { 053 } 054 055 /** 056 * @see org.apache.james.mime4j.parser.ContentHandler#endBodyPart() 057 */ 058 public void endBodyPart() throws MimeException { 059 } 060 061 /** 062 * @see org.apache.james.mime4j.parser.ContentHandler#endHeader() 063 */ 064 public void endHeader() throws MimeException { 065 } 066 067 /** 068 * @see org.apache.james.mime4j.parser.ContentHandler#endMessage() 069 */ 070 public void endMessage() throws MimeException { 071 } 072 073 /** 074 * @see org.apache.james.mime4j.parser.ContentHandler#epilogue(java.io.InputStream) 075 */ 076 public void epilogue(InputStream is) throws MimeException, IOException { 077 } 078 079 /** 080 * @see org.apache.james.mime4j.parser.ContentHandler#field(Field) 081 */ 082 public void field(Field field) throws MimeException { 083 } 084 085 /** 086 * @see org.apache.james.mime4j.parser.ContentHandler#preamble(java.io.InputStream) 087 */ 088 public void preamble(InputStream is) throws MimeException, IOException { 089 } 090 091 /** 092 * @see org.apache.james.mime4j.parser.ContentHandler#startBodyPart() 093 */ 094 public void startBodyPart() throws MimeException { 095 } 096 097 /** 098 * @see org.apache.james.mime4j.parser.ContentHandler#startHeader() 099 */ 100 public void startHeader() throws MimeException { 101 } 102 103 /** 104 * @see org.apache.james.mime4j.parser.ContentHandler#startMessage() 105 */ 106 public void startMessage() throws MimeException { 107 } 108 109 /** 110 * @see org.apache.james.mime4j.parser.ContentHandler#raw(java.io.InputStream) 111 */ 112 public void raw(InputStream is) throws MimeException, IOException { 113 } 114 115 }