org.apache.james.mime4j.message
public abstract class SingleBody extends java.lang.Object implements Body
Modifier | Constructor and Description |
---|---|
protected |
SingleBody()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
SingleBody |
copy()
Returns a copy of this
SingleBody (optional operation). |
void |
dispose()
Subclasses should override this method if they have allocated resources
that need to be freed explicitly (e.g.
|
Entity |
getParent()
Gets the parent of this body.
|
void |
setParent(Entity parent)
Sets the parent of this body.
|
abstract void |
writeTo(java.io.OutputStream out)
Writes this single body to the given stream.
|
public Entity getParent()
Body
getParent
in interface Body
Body.getParent()
public void setParent(Entity parent)
Body
setParent
in interface Body
parent
- the parent.Body.setParent(org.apache.james.mime4j.message.Entity)
public abstract void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- the stream to write to.java.io.IOException
- in case of an I/O errorpublic SingleBody copy()
SingleBody
(optional operation).
The general contract of this method is as follows:
getParent()
on the copy returns null
.
That means that the copy is detached from the parent entity of this
SingleBody
. The copy may get attached to a different
entity later on.SingleBody
.
This implementation always throws an
UnsupportedOperationException
.
SingleBody
.java.lang.UnsupportedOperationException
- if the copy
operation is not supported by this
single body.public void dispose()
dispose
in interface Disposable
Disposable.dispose()
Copyright © 2004-2016. All Rights Reserved.