本文整理汇总了Java中org.apache.tomcat.util.http.fileupload.disk.DiskFileItem类的典型用法代码示例。如果您正苦于以下问题:Java DiskFileItem类的具体用法?Java DiskFileItem怎么用?Java DiskFileItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DiskFileItem类属于org.apache.tomcat.util.http.fileupload.disk包,在下文中一共展示了DiskFileItem类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getHeader
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
@Override
public String getHeader(String name) {
if (fileItem instanceof DiskFileItem) {
return ((DiskFileItem) fileItem).getHeaders().getHeader(name);
}
return null;
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:8,代码来源:ApplicationPart.java
示例2: getHeaderNames
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
@Override
public Collection<String> getHeaderNames() {
if (fileItem instanceof DiskFileItem) {
HashSet<String> headerNames = new HashSet<String>();
Iterator<String> iter =
((DiskFileItem) fileItem).getHeaders().getHeaderNames();
while (iter.hasNext()) {
headerNames.add(iter.next());
}
return headerNames;
}
return Collections.emptyList();
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:ApplicationPart.java
示例3: getHeaders
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
@Override
public Collection<String> getHeaders(String name) {
if (fileItem instanceof DiskFileItem) {
HashSet<String> headers = new HashSet<String>();
Iterator<String> iter =
((DiskFileItem) fileItem).getHeaders().getHeaders(name);
while (iter.hasNext()) {
headers.add(iter.next());
}
return headers;
}
return Collections.emptyList();
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:ApplicationPart.java
示例4: isAvailable
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
/**
* Determine whether the multipart content is still available.
* If a temporary file has been moved, the content is no longer available.
*/
protected boolean isAvailable() {
// If in memory, it's available.
if (this.fileItem.isInMemory()) {
return true;
}
// Check actual existence of temporary file.
if (this.fileItem instanceof DiskFileItem) {
return ((DiskFileItem) this.fileItem).getStoreLocation().exists();
}
// Check whether current file size is different than original one.
return (this.fileItem.getSize() == this.size);
}
开发者ID:FastBootWeixin,项目名称:FastBootWeixin,代码行数:17,代码来源:WxMultipartFile.java
示例5: getStorageDescription
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
/**
* Return a description for the storage location of the multipart content.
* Tries to be as specific as possible: mentions the file location in case
* of a temporary file.
*/
public String getStorageDescription() {
if (this.fileItem.isInMemory()) {
return "in memory";
} else if (this.fileItem instanceof DiskFileItem) {
return "at [" + ((DiskFileItem) this.fileItem).getStoreLocation().getAbsolutePath() + "]";
} else {
return "on disk";
}
}
开发者ID:FastBootWeixin,项目名称:FastBootWeixin,代码行数:15,代码来源:WxMultipartFile.java
示例6: getHeader
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
@Override
public String getHeader(String name) {
if (fileItem instanceof DiskFileItem) {
return ((DiskFileItem) fileItem).getHeaders().getHeader(name);
}
return null;
}
开发者ID:how2j,项目名称:lazycat,代码行数:8,代码来源:ApplicationPart.java
示例7: getHeaderNames
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
@Override
public Collection<String> getHeaderNames() {
if (fileItem instanceof DiskFileItem) {
HashSet<String> headerNames = new HashSet<String>();
Iterator<String> iter = ((DiskFileItem) fileItem).getHeaders().getHeaderNames();
while (iter.hasNext()) {
headerNames.add(iter.next());
}
return headerNames;
}
return Collections.emptyList();
}
开发者ID:how2j,项目名称:lazycat,代码行数:13,代码来源:ApplicationPart.java
示例8: getHeaders
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; //导入依赖的package包/类
@Override
public Collection<String> getHeaders(String name) {
if (fileItem instanceof DiskFileItem) {
HashSet<String> headers = new HashSet<String>();
Iterator<String> iter = ((DiskFileItem) fileItem).getHeaders().getHeaders(name);
while (iter.hasNext()) {
headers.add(iter.next());
}
return headers;
}
return Collections.emptyList();
}
开发者ID:how2j,项目名称:lazycat,代码行数:13,代码来源:ApplicationPart.java
注:本文中的org.apache.tomcat.util.http.fileupload.disk.DiskFileItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论