Class BasicBodyFactory.StringBody1
java.lang.Object
org.apache.james.mime4j.dom.SingleBody
org.apache.james.mime4j.dom.TextBody
org.apache.james.mime4j.message.BasicBodyFactory.StringBody1
- All Implemented Interfaces:
Body, Disposable
- Enclosing class:
BasicBodyFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of thisSingleBody(optional operation).voiddispose()Subclasses should override this method if they have allocated resources that need to be freed explicitly (e.g.Gets aInputStreamwhich reads the bytes of the body.Returns the MIME charset of this text body.Gets aReaderwhich may be used to read out the contents of this body.Methods inherited from class SingleBody
getParent, setParent, size, writeTo
-
Field Details
-
-
charset
-
-
Constructor Details
-
StringBody1
-
-
Method Details
-
getMimeCharset
Description copied from class:TextBodyReturns the MIME charset of this text body.- Specified by:
getMimeCharsetin classTextBody- Returns:
- the MIME charset.
-
getCharset
- Specified by:
getCharsetin classTextBody
-
getReader
Description copied from class:TextBodyGets aReaderwhich may be used to read out the contents of this body.- Specified by:
getReaderin classTextBody- Returns:
- the
Reader. - Throws:
IOException- on I/O errors.
-
getInputStream
Description copied from class:SingleBodyGets aInputStreamwhich reads the bytes of the body.- Specified by:
getInputStreamin classSingleBody- Returns:
- the stream, transfer decoded
- Throws:
IOException- on I/O errors.
-
dispose
public void dispose()Description copied from class:SingleBodySubclasses should override this method if they have allocated resources that need to be freed explicitly (e.g. cannot be simply reclaimed by the garbage collector). The default implementation of this method does nothing.- Specified by:
disposein interfaceDisposable- Overrides:
disposein classSingleBody- See Also:
-
copy
Description copied from class:SingleBodyReturns a copy of thisSingleBody(optional operation).The general contract of this method is as follows:
- Invoking
SingleBody.getParent()on the copy returnsnull. That means that the copy is detached from the parent entity of thisSingleBody. The copy may get attached to a different entity later on. - The underlying content does not have to be copied. Instead it may be
shared between multiple copies of a
SingleBody. - If the underlying content is shared by multiple copies the implementation has to make sure that the content gets deleted when the last copy gets disposed of (and not before that).
This implementation always throws an
UnsupportedOperationException.- Overrides:
copyin classSingleBody- Returns:
- a copy of this
SingleBody.
- Invoking
-