de.unkrig.commons.net.http
Interface HttpMessage.Body

Enclosing class:
HttpMessage

public static interface HttpMessage.Body

The life cycle of a HttpMessage.Body is as follows:

  1. Create the object by calling one of the following methods:
  2. Call exactly one of the following methods:
  3. Call dispose() as many times as you want
Otherwise, a resource leak will occur.


Method Summary
 void dispose()
           
 java.io.InputStream inputStream()
          The caller is responsible for closing the returned InputStream.
 java.lang.String string(java.nio.charset.Charset charset)
           
 void write(java.io.OutputStream stream)
           
 

Method Detail

string

java.lang.String string(java.nio.charset.Charset charset)
                        throws java.io.IOException
Throws:
java.io.IOException
See Also:
HttpMessage.Body

inputStream

java.io.InputStream inputStream()
                                throws java.io.IOException
The caller is responsible for closing the returned InputStream.

Throws:
java.io.IOException
See Also:
HttpMessage.Body

write

void write(java.io.OutputStream stream)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
HttpMessage.Body

dispose

void dispose()
See Also:
HttpMessage.Body