All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.smartboot.http.client.CommonBody Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package org.smartboot.http.client;

/**
 * @author 三刀([email protected])
 * @version V1.0 , 2023/2/13
 */
class CommonBody implements Body {
    private final Body body;
    private final T rest;


    public CommonBody(Body 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 Body flush() {
        body.flush();
        return this;
    }

    @Override
    public T done() {
        body.flush();
        return rest;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy