Writer와 ServletOutputStream의 차이

Writer로하면 밑에서의 로그처럼 응답내용을 Wrapper할 수 있다.

2014-04-19 00:06:01,597 INFO [MobileFilter : 337] [ ] ( ) RESPONSE[1]
– Status : 200
– Time Elapsed : 742ms
– Content-Type : application/json;charset=utf-8
– Content-Length : 174
– Character-Encoding : utf-8
– Body :
{“teams”:{“1313″:{“draw”:1,”id”:1313,”lose”:66,”rank”:10381,”level”:2,”initial”:”TMG”,”name”:”ケイゴーズ”,”address1″:”兵庫県”,”win”:41,”logoId”:1714}},”mode”:”login”}

Stream의 경우는 불가능하다.

This entry was posted in Java, Web. Bookmark the permalink.