14fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy/**************************************************************** 24fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * Licensed to the Apache Software Foundation (ASF) under one * 34fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * or more contributor license agreements. See the NOTICE file * 44fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * distributed with this work for additional information * 54fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * regarding copyright ownership. The ASF licenses this file * 64fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * to you under the Apache License, Version 2.0 (the * 74fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * "License"); you may not use this file except in compliance * 84fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * with the License. You may obtain a copy of the License at * 94fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * * 104fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * http://www.apache.org/licenses/LICENSE-2.0 * 114fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * * 124fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * Unless required by applicable law or agreed to in writing, * 134fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * software distributed under the License is distributed on an * 144fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 154fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * KIND, either express or implied. See the License for the * 164fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * specific language governing permissions and limitations * 174fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * under the License. * 184fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy ****************************************************************/ 194fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy 204fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedypackage org.apache.james.mime4j.message; 214fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy 224fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedyimport java.io.IOException; 234fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedyimport java.io.OutputStream; 244fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy 254fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy/** 264fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * Encapsulates the body of an entity (see RFC 2045). 274fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * 284fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * 294fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * @version $Id: Body.java,v 1.4 2004/10/04 15:36:43 ntherning Exp $ 304fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy */ 314fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedypublic interface Body { 324fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy 334fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy /** 344fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * Gets the parent of this body. 354fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * 364fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * @return the parent. 374fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy */ 384fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy Entity getParent(); 394fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy 404fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy /** 414fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * Sets the parent of this body. 424fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * 434fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * @param parent the parent. 444fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy */ 454fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy void setParent(Entity parent); 464fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy 474fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy /** 484fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * Writes this body to the given stream in MIME message format. 494fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * 504fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * @param out the stream to write to. 514fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy * @throws IOException on I/O errors. 524fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy */ 534fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy void writeTo(OutputStream out) throws IOException; 544fa0a3295bcacbdcd6a9e7709cf17aa5adb90356Scott Kennedy} 55