## Issue
Closes#5808
## Change
`JdkHttpClient.readBody(HttpResponse<InputStream>)` builds the
`HttpException` message that streaming (SSE) callers receive through
`listener.onError()`. It read the stream with
`reader.lines().collect(joining(System.lineSeparator()))`, which drops
the original line separators and the trailing one, and its
`InputStreamReader` had no charset, so decoding fell back to the JVM
default.
The synchronous path in the same class (`execute(HttpRequest)`) already
does `new String(body, UTF_8)`. This change makes the streaming path
match:
```java
try (InputStream inputStream = response.body()) {
return new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
}
```
Three now-unused imports (`BufferedReader`, `InputStreamReader`,
`Collectors.joining`) are removed. Nothing else in the file changes.
New unit test `JdkHttpClientErrorBodyTest` (WireMock, no API key) stubs
a `400` with body `line1\r\nline2\r\n` and asserts the exception message
matches exactly. It fails before this change (`line1\nline2`) regardless
of the JVM default charset.
`ApacheHttpClient.readBody` has the same pattern. It is left alone so
this one can be reviewed first.
## General checklist
- [X] There are no breaking changes (API, behaviour)
- [X] I have added unit and/or integration tests for my change
- [X] The tests cover both positive and negative cases
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
Unit tests in the module are green (9 tests). `JdkHttpClientIT` and
`JdkHttpClientTimeoutIT` were not run locally because they need external
services.
- [X] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Will be added after approval, per the contribution guide -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
<!-- N/A - internal bug fix, no example needed -->
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
<!-- N/A - unrelated to Spring Boot starters -->
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)