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

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

There is a newer version: 1.4.3
Show newest version
/*******************************************************************************
 * Copyright (c) 2017-2021, org.smartboot. All rights reserved.
 * project name: smart-http
 * file name: BodyStream.java
 * Date: 2021-07-17
 * Author: sandao ([email protected])
 ******************************************************************************/

package org.smartboot.http.client;

/**
 * @author 三刀([email protected])
 * @version V1.0 , 2021/7/17
 */
public interface Body {
    /**
     * 往缓冲区中写入数据
     */
    Body write(byte[] bytes, int offset, int len);

    /**
     * 往缓冲区中写入数据
     */
    default Body write(byte[] bytes) {
        write(bytes, 0, bytes.length);
        return this;
    }

    /**
     * 输出缓冲区的数据
     */
    Body flush();

    /**
     * 结束body流操作
     */
    T done();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy