• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UploadedFile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: upload

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
/**
 * Upload.
 * 
 * @param file the file
 * @return the file
 */
private File upload(UploadedFile file) {
    if (file == null)
        return null;
    String name = FilenameUtils.getName(file.getName());
    File tempFile = new File(privateFolder, name);
    try {
        InputStream is = file.getInputStream();
        try {
            copyTo(is, tempFile);
        } finally {
            is.close();
        }
    } catch (IOException e) {
        tempFile = null;
    }
    return tempFile;
}
 
开发者ID:Orange-OpenSource,项目名称:matos-tool,代码行数:24,代码来源:MatosCampaign.java


示例2: testSave

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
@Test
public void testSave() throws Exception {
    TemplateBean bean = getTestBean();

    UploadedFile uf = Mockito.mock(UploadedFile.class);
    Mockito.when(uf.getName()).thenReturn("test.txt");

    bean.setUploadedFile(uf);

    assertNull(bean.getStatus());
    bean.save();

    assertNotNull(bean.getStatus());
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:15,代码来源:TemplateBeanTest.java


示例3: setUploadedFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedFile(UploadedFile uploadedFile)
{
  // note: only replace the previously uploaded file, if user specified a 
  // new file (since multiple page reloads may occur before the 
  // transformation operation is invoked)
  if (uploadedFile != null) {
    log.info("uploaded new file " + uploadedFile);
    _uploadedFile = uploadedFile;
  }
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:11,代码来源:PlateReaderRawDataTransformer.java


示例4: getUploadedFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedFile() {
    return uploadedFile;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:TemplateBean.java


示例5: setUploadedFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedFile(UploadedFile uploadedFile) {
    this.uploadedFile = uploadedFile;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:TemplateBean.java


示例6: getOrganizationProperties

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getOrganizationProperties() {
    return organizationProperties;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:OperatorOrgBean.java


示例7: setOrganizationProperties

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setOrganizationProperties(UploadedFile organizationProperties) {
    this.organizationProperties = organizationProperties;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:OperatorOrgBean.java


示例8: getFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getFile() {
	return file;
}
 
开发者ID:aureliano,项目名称:verbum-domini,代码行数:4,代码来源:BookEditMB.java


示例9: setFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setFile(UploadedFile file) {
	this.file = file;
}
 
开发者ID:aureliano,项目名称:verbum-domini,代码行数:4,代码来源:BookEditMB.java


示例10: getUpFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUpFile() {
    return upFile;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:SpreadsheetUploadBean.java


示例11: setUpFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUpFile(UploadedFile upFile) {
    if(log.isDebugEnabled()) log.debug("upload file name " + upFile.getName());
    this.upFile = upFile;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:5,代码来源:SpreadsheetUploadBean.java


示例12: getTemporaryFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getTemporaryFile() {
    return temporaryFile;
}
 
开发者ID:faramir,项目名称:ZawodyWeb,代码行数:4,代码来源:RequestBean.java


示例13: setTemporaryFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setTemporaryFile(UploadedFile temporaryFile) {
    this.temporaryFile = temporaryFile;
}
 
开发者ID:faramir,项目名称:ZawodyWeb,代码行数:4,代码来源:RequestBean.java


示例14: setUploadedFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedFile(UploadedFile uploadedFile)
{
  _uploadedFile = uploadedFile;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:LibraryContentsImporter.java


示例15: getUploadedFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedFile()
{
  return _uploadedFile;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:LibraryContentsImporter.java


示例16: setUploadedPublicationAttachedFileContents

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedPublicationAttachedFileContents(UploadedFile uploadedFile)
{
  _uploadedPublicationAttachedFileContents = uploadedFile;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:ScreenDetailViewer.java


示例17: getUploadedPublicationAttachedFileContents

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedPublicationAttachedFileContents()
{
  return _uploadedPublicationAttachedFileContents;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:ScreenDetailViewer.java


示例18: setUploadedAttachedFileContents

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedAttachedFileContents(UploadedFile uploadedFile)
{
  _uploadedAttachedFileContents = uploadedFile;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:AttachedFiles.java


示例19: getUploadedAttachedFileContents

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedAttachedFileContents()
{
  return _uploadedAttachedFileContents;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:AttachedFiles.java


示例20: setUserAgreementUploadedFile

import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUserAgreementUploadedFile(UploadedFile uploadedFile)
{
  _userAgreementUploadedFile = uploadedFile;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:UserAgreementUpdater.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TransportStrategy类代码示例发布时间:2022-05-23
下一篇:
Java JndiUtil类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap