com.mockrunner.mock.web.MockServletInputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockrunner-core Show documentation
Show all versions of mockrunner-core Show documentation
Core classes common to all Mockrunner modules
package com.mockrunner.mock.web;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import javax.servlet.ServletInputStream;
/**
* Mock implementation of ServletInputStream
.
*/
public class MockServletInputStream extends ServletInputStream
{
private ByteArrayInputStream stream;
public MockServletInputStream(byte[] data)
{
stream = new ByteArrayInputStream(data);
}
public int read() throws IOException
{
return stream.read();
}
}