Read post body into an array. @param body The bytes array in which the body will be read @param len The body length @throws IOException if an IO exception occurred or EOF is reached before the body has been fully read
(byte[] body, int len)
| 3122 | * @throws IOException if an IO exception occurred or EOF is reached before the body has been fully read |
| 3123 | */ |
| 3124 | protected void readPostBodyFully(byte[] body, int len) throws IOException { |
| 3125 | int offset = 0; |
| 3126 | do { |
| 3127 | int inputLen = getStream().read(body, offset, len - offset); |
| 3128 | if (inputLen <= 0) { |
| 3129 | throw new EOFException(); |
| 3130 | } |
| 3131 | offset += inputLen; |
| 3132 | } while ((len - offset) > 0); |
| 3133 | } |
| 3134 | |
| 3135 | |
| 3136 | /** |
no test coverage detected