图中fileStream是CoyoteInputStream类的实例。chunkBytes是一个2M大小的byte数组。
fileStream的长度有9M多,我调用fileStream的read方法,希望能够读取2M数据到chunkBytes中,但是每次只能读取8K
我自己用BufferedInputStream读取数据,一次就能够读取到2M。为什么CoyoteInputStream就不能呢?
查阅了tomcat的官方文档,也没有对CoyoteInputStream的read方法作特别说明。下图是文档对CoyoteInputStream.read()方法的说明,没有什么特别之处。
使用CoyoteInputStream.read()方法到底是不是一次最多只能读取8K的数据?
tomcat版本9.0.1,spring版本4.3.12