Servlet ServletInputStream类

ServletInputStream类提供流从请求对象读取二进制数据,如图像等。这是一个抽象类。

ServletRequest接口的getInputStream()方法返回ServletInputStream类的实例。 所以可以得到:

ServletInputStream sin=request.getInputStream();

ServletInputStream类的方法

ServletInputStream类中只定义了一种方法。

  • int readLine(byte[] b, int off, int len) - 它读取输入流。

上一篇: Servlet增删改查 下一篇: Servlet ServletOutputStream类