本文整理汇总了Java中ro.pippo.core.FileItem类的典型用法代码示例。如果您正苦于以下问题:Java FileItem类的具体用法?Java FileItem怎么用?Java FileItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FileItem类属于ro.pippo.core包,在下文中一共展示了FileItem类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: uploadFile
import ro.pippo.core.FileItem; //导入依赖的package包/类
@POST("/{petId}/uploadImage")
@ApiSummary("uploads an image")
@RequirePermission("update:pet")
@Produces(Produces.JSON)
@Return(code = 200, description = "Successful operation")
public void uploadFile(
@Desc("ID of pet to update") long petId,
@Desc("Additional data to pass to server") @Form String additionalMetadata,
@Desc("file to upload") @Form FileItem file) {
getResponse().ok();
}
示例2: setObjectType
import ro.pippo.core.FileItem; //导入依赖的package包/类
@Override
public void setObjectType(Class<?> objectType) {
Preconditions.checkArgument(FileItem.class == objectType, "'{}' is not a valid target type", objectType.getName());
}
示例3: extract
import ro.pippo.core.FileItem; //导入依赖的package包/类
@Override
public FileItem extract(Context context) {
FileItem fileItem = context.getRequest().getFile(name);
return fileItem;
}
示例4: isApplicable
import ro.pippo.core.FileItem; //导入依赖的package包/类
@Override
public boolean isApplicable(MethodParameter parameter) {
return FileItem.class == parameter.getParameterType();
}