How do i get the Content-Length
of a String[]
in java?
Current code:
public static int getLength(String[] sa) {
int result = 0;
for (String s : sa)
result += s.length();
return result;
}
But an incorrect value is returned therefor the browser doesn't read the whole message body.