org.apache.http.entity.mime.content
Class StringBody

java.lang.Object
  extended by org.apache.james.mime4j.message.SingleBody
      extended by org.apache.http.entity.mime.content.AbstractContentBody
          extended by org.apache.http.entity.mime.content.StringBody
All Implemented Interfaces:
ContentBody, ContentDescriptor, Body, Disposable

@NotThreadSafe
public class StringBody
extends AbstractContentBody

Since:
4.0

Constructor Summary
StringBody(String text)
           
StringBody(String text, Charset charset)
           
StringBody(String text, String mimeType, Charset charset)
           
 
Method Summary
 String getCharset()
           
 long getContentLength()
           
 Map<String,String> getContentTypeParameters()
           
 String getFilename()
           
 Reader getReader()
           
 String getTransferEncoding()
           
 void writeTo(OutputStream out)
           
 void writeTo(OutputStream out, int mode)
          Deprecated. use writeTo(OutputStream)
 
Methods inherited from class org.apache.http.entity.mime.content.AbstractContentBody
dispose, getMediaType, getMimeType, getParent, getSubType, setParent
 
Methods inherited from class org.apache.james.mime4j.message.SingleBody
copy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringBody

public StringBody(String text,
                  String mimeType,
                  Charset charset)
           throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

StringBody

public StringBody(String text,
                  Charset charset)
           throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

StringBody

public StringBody(String text)
           throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

getReader

public Reader getReader()

writeTo

@Deprecated
public void writeTo(OutputStream out,
                               int mode)
             throws IOException
Deprecated. use writeTo(OutputStream)

Throws:
IOException

writeTo

public void writeTo(OutputStream out)
             throws IOException
Specified by:
writeTo in class SingleBody
Throws:
IOException

getTransferEncoding

public String getTransferEncoding()

getCharset

public String getCharset()

getContentTypeParameters

public Map<String,String> getContentTypeParameters()
Specified by:
getContentTypeParameters in interface ContentDescriptor
Overrides:
getContentTypeParameters in class AbstractContentBody

getContentLength

public long getContentLength()

getFilename

public String getFilename()


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.