# Class MessageBodyWebRequest.InputStreamMessageBody

java.lang.Object
com.meterware.httpunit.protocol.MessageBody
com.meterware.httpunit.MessageBodyWebRequest.InputStreamMessageBody

Enclosing class:
  `MessageBodyWebRequest`

public static class MessageBodyWebRequest.InputStreamMessageBody extends com.meterware.httpunit.protocol.MessageBody
A method request message body read directly from an input stream.

## Constructor Summary

Constructors
Constructor
Description
`InputStreamMessageBody(InputStream source, String contentType)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getContentType()`
Returns the content type of this message body.
`void`
`writeTo(OutputStream outputStream, com.meterware.httpunit.protocol.ParameterCollection parameters)`
Transmits the body of this request as a sequence of bytes.

### Methods inherited from class com.meterware.httpunit.protocol.MessageBody

`createPostMethodMessageBody, getCharacterSet`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### InputStreamMessageBody

public InputStreamMessageBody(InputStream source, String contentType)

## Method Details

### getContentType

public String getContentType()
Returns the content type of this message body.

Specified by:
  `getContentType` in class `com.meterware.httpunit.protocol.MessageBody`

### writeTo

public void writeTo(OutputStream outputStream, com.meterware.httpunit.protocol.ParameterCollection parameters) throws IOException
Transmits the body of this request as a sequence of bytes.

Specified by:
  `writeTo` in class `com.meterware.httpunit.protocol.MessageBody`
Throws:
  `IOException`