当前位置: 首页>>代码示例>>Java>>正文


Java FileItemHeaders类代码示例

本文整理汇总了Java中org.apache.commons.fileupload.FileItemHeaders的典型用法代码示例。如果您正苦于以下问题:Java FileItemHeaders类的具体用法?Java FileItemHeaders怎么用?Java FileItemHeaders使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FileItemHeaders类属于org.apache.commons.fileupload包,在下文中一共展示了FileItemHeaders类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: assertHeadersAreEqual

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
static void assertHeadersAreEqual(final FileItemHeaders fileItemHeaders, final Map<String, List<String>> headersFromPart){
    int i = 0;
    final Iterator<String> headerNamesIterator = fileItemHeaders.getHeaderNames();
    while (headerNamesIterator.hasNext()){
        i++;

        String headerName = headerNamesIterator.next();
        List<String> headerValues = Lists.newArrayList(fileItemHeaders.getHeaders(headerName));
        List<String> headerValues1 = headersFromPart.get(headerName);

        if (log.isDebugEnabled()){
            log.debug("Commons io header values for    '" + headerName + "': " + (headerValues != null ? Joiner.on(",").join(headerValues) : "null"));
            log.debug("Nio multipart header values for '" + headerName + "': " + (headerValues1 != null ? Joiner.on(",").join(headerValues1) : "null"));
        }

        Assert.assertEquals(headerValues, headerValues1);
    }
    Assert.assertEquals(i, headersFromPart.size());
}
 
开发者ID:synchronoss,项目名称:nio-multipart,代码行数:20,代码来源:FunctionalTest.java

示例2: dumpFileIterator

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
void dumpFileIterator(final FileItemIterator fileItemIterator){

        int partIndex = 0;

        try {
            log.info("-- COMMONS FILE UPLOAD --");
            while (fileItemIterator.hasNext()) {
                log.info("-- Part " + partIndex++);
                FileItemStream fileItemStream = fileItemIterator.next();

                FileItemHeaders fileItemHeaders = fileItemStream.getHeaders();
                Iterator<String> headerNames = fileItemHeaders.getHeaderNames();
                while(headerNames.hasNext()){
                    String headerName = headerNames.next();
                    log.info("Header: " + headerName+ ": " + Joiner.on(',').join(fileItemHeaders.getHeaders(headerName)));
                }
                log.info("Body:\n" + IOUtils.toString(fileItemStream.openStream()));
            }
            log.info("-- ------------------- --");
        }catch (Exception e){
            log.error("Error dumping the FileItemIterator", e);
        }

    }
 
开发者ID:synchronoss,项目名称:nio-multipart,代码行数:25,代码来源:FunctionalTest.java

示例3: getHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public FileItemHeaders getHeaders() {
	throw new UnsupportedOperationException();
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:5,代码来源:CommonsMultipartResolverTests.java

示例4: setHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public void setHeaders(FileItemHeaders headers) {
	throw new UnsupportedOperationException();
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:5,代码来源:CommonsMultipartResolverTests.java

示例5: getHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public FileItemHeaders getHeaders() {
    return null;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:5,代码来源:M2RepositoryServiceImplTest.java

示例6: setHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public void setHeaders(FileItemHeaders fileItemHeaders) {
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:4,代码来源:M2RepositoryServiceImplTest.java

示例7: getHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
public FileItemHeaders getHeaders() {
    return null;
}
 
开发者ID:skynav,项目名称:ttt,代码行数:4,代码来源:FragmentItemStream.java

示例8: setHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
public void setHeaders(FileItemHeaders headers) {
}
 
开发者ID:skynav,项目名称:ttt,代码行数:3,代码来源:FragmentItemStream.java

示例9: getHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public FileItemHeaders getHeaders() {
	return null;
}
 
开发者ID:mindie,项目名称:Cindy,代码行数:5,代码来源:FormFileItem.java

示例10: setHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public void setHeaders(FileItemHeaders headers) {
	throw new RuntimeException("Invalid operation on FormFileItem");
}
 
开发者ID:mindie,项目名称:Cindy,代码行数:5,代码来源:FormFileItem.java

示例11: setHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public void setHeaders(FileItemHeaders headers) {
	throw new RuntimeException("Invalid operation on BodyFileItem");
}
 
开发者ID:mindie,项目名称:Cindy,代码行数:5,代码来源:BodyFileItem.java

示例12: getFileName

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
protected String getFileName(FileItemHeaders headers) {
    return getFileName(headers.getHeader(CONTENT_DISPOSITION));
}
 
开发者ID:solmix,项目名称:wmix,代码行数:5,代码来源:ServletFileUpload.java

示例13: getHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public FileItemHeaders getHeaders( )
{
    return _item.getHeaders( );
}
 
开发者ID:lutece-platform,项目名称:lutece-core,代码行数:9,代码来源:NormalizeFileItem.java

示例14: setHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void setHeaders( FileItemHeaders headers )
{
    _item.setHeaders( headers );
}
 
开发者ID:lutece-platform,项目名称:lutece-core,代码行数:9,代码来源:NormalizeFileItem.java

示例15: getHeaders

import org.apache.commons.fileupload.FileItemHeaders; //导入依赖的package包/类
@Override
public FileItemHeaders getHeaders() {
	System.out.println("getHeaders");
	return null;
}
 
开发者ID:renepickhardt,项目名称:metalcon,代码行数:6,代码来源:ImageFileItem.java


注:本文中的org.apache.commons.fileupload.FileItemHeaders类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。