Datasets:

ArXiv:
License:
Stack-Repo / data /val /jesusbmx /HttpCli /src /httpcli /BytesResponseBody.java
denisko's picture
cnanged dir structure and removed features file
3e77472
raw
history blame
655 Bytes
package httpcli;
import java.io.ByteArrayInputStream;
import java.io.IOException;
public class BytesResponseBody extends ResponseBody {
public final byte[] data;
public BytesResponseBody(ResponseBody body, byte[] data) {
super(new ByteArrayInputStream(data));
this.data = data;
this.request = body.request;
this.code = body.code;
this.headers = body.headers;
this.contentLength = body.contentLength;
this.contentEncoding = body.contentEncoding;
this.contentType = body.contentType;
}
@Override public byte[] bytes() throws IOException {
return data;
}
}