java.lang.IllegalStateException STREAMED
request.getInputStream() 和 request.getReader()不能同時調用,否則會引發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 豬 閱讀(3066) 評論(0) 編輯 收藏 所屬分類: 學習java