[JAVA] String.lengh() VS String.getBytes().length

http://www.pixelstech.net/article/1427944920-String-length()-vs-String-getBytes()-length-in-Java


UI 에 response 타입에 content-length 를 String.lengh()로 보냄
길이가 다름. (원래 길이보다 모자르게 감)
String.getBytes().length로 해야 일치.

댓글

이 블로그의 인기 게시물

[JDBC] 쿼리 후에 ResultSet 에 데이터가 있는지 확인하는 방법

[Android] Android 로깅 시 isLoggable() 메서드 사용

[Spring] @PropertySource and Environment 사용시 Property 값이 null 로 들어오는 경우