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

cn.majingjing.http.client.response.handle.StringDataHandler Maven / Gradle / Ivy

package cn.majingjing.http.client.response.handle;

import java.nio.charset.StandardCharsets;

/**
 * 文本数据处理
 *
 * @author MaMarion
 * @date 2020/4/24
 */
public class StringDataHandler implements DataHandler {


    /**
     * Convert body to T
     *
     * @param body response body byte[]
     * @return T
     */
    @Override
    public String handle(byte[] body) {
        return new String(body, StandardCharsets.UTF_8);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy