Datasets:

ArXiv:
License:
File size: 415 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package httpcli.adapter;

import httpcli.BytesResponseBody;
import httpcli.ResponseBody;

public class RespBodyRB implements RespBodyAdapter<ResponseBody> {

    @Override
    public ResponseBody parse(ResponseBody respBody) throws Exception {
      try {
        byte[] data = respBody.bytes();
        return new BytesResponseBody(respBody, data);
      } finally {
        respBody.close();
      }
    }
    
}