All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mockrunner.mock.web.MockServletInputStream Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy