java.lang.IllegalStateException STREAMED
request.getInputStream() 和 request.getReader()不能同時(shí)調(diào)用,否則會(huì)引發(fā)java.lang.IllegalStateException異常。
API中有寫:
getInputStream
public ServletInputStream getInputStream() throws java.io.IOException
- Retrieves the body of the request as binary data using a
ServletInputStream
. Either this method orgetReader()
may be called to read the body, not both.- Returns:
- a
ServletInputStream
object containing the body of the request - Throws:
java.lang.IllegalStateException
- if thegetReader()
method has already been called for this requestjava.io.IOException
- if an input or output exception occurred
posted on 2009-10-19 13:48 豬 閱讀(3075) 評(píng)論(0) 編輯 收藏 所屬分類: 學(xué)習(xí)java