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

cn.ipokerface.weixin.request.http.apache.AbstractContentBody Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package cn.ipokerface.weixin.request.http.apache;

import cn.ipokerface.weixin.request.http.ContentType;
import cn.ipokerface.weixin.request.http.MimeType;

import java.nio.charset.Charset;

/**
 * Created by       PokerFace
 * Create Date      2019-12-27.
 * Email:           [email protected]
 * Version          1.0.0
 * 

* Description: */ public abstract class AbstractContentBody implements ContentBody { private final ContentType contentType; /** * @since 4.3 */ public AbstractContentBody(final ContentType contentType) { super(); this.contentType = contentType; } /** * @since 4.3 */ public ContentType getContentType() { return this.contentType; } @Override public MimeType getMimeType() { return this.contentType.getMimeType(); } @Override public String getCharset() { final Charset charset = this.contentType.getCharset(); return charset != null ? charset.name() : null; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy