Package com.meterware.pseudoserver

# Class WebResource

java.lang.Object
com.meterware.pseudoserver.WebResource

public class WebResource extends Object
A resource to be returned from the simulated server.

## Constructor Summary

Constructors
Constructor
Description
`WebResource(byte[] contents, String contentType)`
`WebResource(byte[] contents, String contentType, int responseCode)`
`WebResource(InputStream stream, String contentType, int responseCode)`
`WebResource(String contents)`
`WebResource(String contents, int responseCode)`
`WebResource(String contents, String contentType)`
`WebResource(String contents, String contentType, int responseCode)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addHeader(String header)`
`void`
`setCharacterSet(String characterSet)`
`void`
`setSendCharacterSet(boolean enabled)`
`void`
`suppressAutomaticContentTypeHeader()`
`void`
`suppressAutomaticLengthHeader()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### WebResource

public WebResource(String contents)

### WebResource

public WebResource(String contents, String contentType)

### WebResource

public WebResource(byte[] contents, String contentType)

### WebResource

public WebResource(String contents, int responseCode)

### WebResource

public WebResource(String contents, String contentType, int responseCode)

### WebResource

public WebResource(byte[] contents, String contentType, int responseCode)

### WebResource

public WebResource(InputStream stream, String contentType, int responseCode)

## Method Details

### addHeader

public void addHeader(String header)

### setCharacterSet

public void setCharacterSet(String characterSet)

### setSendCharacterSet

public void setSendCharacterSet(boolean enabled)

### suppressAutomaticLengthHeader

public void suppressAutomaticLengthHeader()

### suppressAutomaticContentTypeHeader

public void suppressAutomaticContentTypeHeader()

### toString

public String toString()

Overrides:
  `toString` in class `Object`