org.yelong.http.request.file.DefaultFileItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yelong-http Show documentation
Show all versions of yelong-http Show documentation
简单封装java对http的请求,实现便捷的发送http请求(可以发送携带文件的请求)
The newest version!
/**
*
*/
package org.yelong.http.request.file;
/**
* @since 1.0
*/
public class DefaultFileItem implements FileItem {
private String fileName;
private long fileLength;
private byte[] content;
private String mimeType;
public DefaultFileItem(String fileName, long fileLength, byte[] content, String mimeType) {
this.fileName = fileName;
this.fileLength = fileLength;
this.content = content;
this.mimeType = mimeType;
}
@Override
public String getFileName() {
return this.fileName;
}
@Override
public long getFileLength() {
return this.fileLength;
}
@Override
public byte[] getContent() {
return this.content;
}
@Override
public String getMimeType() {
return this.mimeType;
}
}