1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.servlet;
12
13 import java.io.ByteArrayInputStream;
14 import java.io.IOException;
15 import java.io.InputStream;
16
17 import javax.servlet.ServletInputStream;
18
19 public class MockServletInputStream extends ServletInputStream
20 {
21 private InputStream input;
22
23 public MockServletInputStream(InputStream dataStream)
24 {
25 super();
26 input = dataStream;
27 }
28
29 public MockServletInputStream()
30 {
31 this(new ByteArrayInputStream(new byte[0]));
32 }
33
34 @Override
35 public int read() throws IOException
36 {
37 return input.read();
38 }
39 }
40