(IHttpRequestResponse httpRequestResponse)
| 170 | } |
| 171 | |
| 172 | public static String getContentLength(IHttpRequestResponse httpRequestResponse) { |
| 173 | byte[] response = httpRequestResponse.getResponse(); |
| 174 | String responseString = new String(response); |
| 175 | String contentLength = "0"; |
| 176 | Pattern contentLengthPattern = Pattern.compile("Content-Length: (\\d+)"); |
| 177 | Matcher contentLengthMatcher = contentLengthPattern.matcher(responseString); |
| 178 | if (contentLengthMatcher.find()) { |
| 179 | contentLength = contentLengthMatcher.group(1); |
| 180 | } |
| 181 | return contentLength; |
| 182 | } |
| 183 | |
| 184 | public static <E> List<E> removeDuplicateElement(List<E> list) { |
| 185 | if (list.size() < 2) { |
no test coverage detected