| 253 | /// `ConnectionRequest.setRequestBody(Data)` without an extra |
| 254 | /// copy. |
| 255 | private static final class ByteData implements Data { |
| 256 | private final byte[] body; |
| 257 | |
| 258 | ByteData(byte[] body) { |
| 259 | this.body = body; |
| 260 | } |
| 261 | |
| 262 | @Override |
| 263 | public void appendTo(OutputStream output) throws IOException { |
| 264 | output.write(body); |
| 265 | } |
| 266 | |
| 267 | @Override |
| 268 | public long getSize() throws IOException { |
| 269 | return body.length; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | /// Subclasses `ConnectionRequest` so we can suppress its default |
| 274 | /// "non-2xx is an error" handling -- gRPC-Web always returns |
nothing calls this directly
no outgoing calls
no test coverage detected