class FileLikePart extends PartBase {

    private static final MimetypesFileTypeMap MIME_TYPES_FILE_TYPE_MAP;

    static {
        try (InputStream is = FileLikePart.class.getResourceAsStream("ahc-mime.types")) {
            MIME_TYPES_FILE_TYPE_MAP = new MimetypesFileTypeMap(is);
        } catch (IOException e) {
            throw new ExceptionInInitializerError(e);
        }
    }

    /**
     * Default content encoding of file attachments.
     */
    private final String fileName;

    /**
     * FilePart Constructor.
     *
     * @param name             the name for this part
     * @param contentType      the content type for this part, if {@code null} try to figure out from the fileName mime type
     * @param charset          the charset encoding for this part
     * @param fileName         the fileName
     * @param contentId        the content id
     * @param transferEncoding the transfer encoding
     */
    protected FileLikePart(String name, String contentType, Charset charset, String fileName, String contentId, String transferEncoding) {
        super(name,
                computeContentType(contentType, fileName),
                charset,
                contentId,
                transferEncoding);
        this.fileName = fileName;
    }

    private static String computeContentType(String contentType, String fileName) {<FILL_FUNCTION_BODY>}

    public String getFileName() {
        return fileName;
    }

    @Override
    public String toString() {
        return super.toString() + " filename=" + fileName;
    }
}

        return contentType != null ? contentType : MIME_TYPES_FILE_TYPE_MAP.getContentType(withDefault(fileName, ""));
    
<methods>public void addCustomHeader(java.lang.String, java.lang.String) ,public java.nio.charset.Charset getCharset() ,public java.lang.String getContentId() ,public java.lang.String getContentType() ,public List<org.asynchttpclient.Param> getCustomHeaders() ,public java.lang.String getDispositionType() ,public java.lang.String getName() ,public java.lang.String getTransferEncoding() ,public void setCustomHeaders(List<org.asynchttpclient.Param>) ,public void setDispositionType(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed java.nio.charset.Charset charset,private final non-sealed java.lang.String contentId,private final non-sealed java.lang.String contentType,private List<org.asynchttpclient.Param> customHeaders,private java.lang.String dispositionType,private final non-sealed java.lang.String name,private final non-sealed java.lang.String transferEncoding