org.smartboot.http.client.CommonBody Maven / Gradle / Ivy
package org.smartboot.http.client;
/**
* @author 三刀([email protected])
* @version V1.0 , 2023/2/13
*/
class CommonBody implements Body {
private final Body extends HttpRest> body;
private final T rest;
public CommonBody(Body extends HttpRest> body, T rest) {
this.body = body;
this.rest = rest;
}
@Override
public Body write(byte[] bytes, int offset, int len) {
body.write(bytes, offset, len);
return this;
}
@Override
public final Body flush() {
body.flush();
return this;
}
@Override
public final T done() {
return rest;
}
}