hi all,
thought I would add some progress on this topic.
I have changed my method for reading from the HttpServletRequest object but
the same warning message is thrown for every 8192 bytes read. I no longer
regard my code to be suspect though am happy to be corrected. The
application operates completely normally except for the warning message. The
code I am using to read the input is shown below.
public void doPost(HttpServletRequest httpServletRequest.....etc
.......other code..............
char[] cbuf=new char[8192];
int i=0;
int requestLength=httpServletRequest.getContentLength();
BufferedReader in=httpServletRequest.getReader();
StringBuilder sb=new StringBuilder(requestLength);
while(sb.length()<requestLength){
if(in.ready()){
i=in.read(cbuf,0,reqLen);
}
sb.append(cbuf,0,i);
}
in.close();
String message=sb.toString();
//.....etc
--
View this message in context:
http://tomcat.10.x6.nabble.com/buffer-expand-warning-in-Tomcat-apache-tomcat-8-0-0-RC1-embed-tp5003745p5003777.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]