org.apache.wicket.util.file.File.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.apache.wicket.util.file.File.<init>()方法的一些代码示例,展示了File.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。File.<init>()方法的具体详情如下:
包路径:org.apache.wicket.util.file.File
类名称:File
方法名:<init>

File.<init>介绍

[英]Construct.
[中]建筑

代码示例

代码示例来源:origin: org.apache.wicket/wicket-util

/**
 * @param name
 *            Name of child file
 * @return Child file object
 */
public File file(final String name)
{
  return new File(this, name);
}

代码示例来源:origin: org.apache.wicket/wicket-util

/**
 * Constructor.
 * 
 * @param file
 *            {@link java.io.File} containing resource
 */
public FileResourceStream(final java.io.File file)
{
  this.file = new File(file);
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Constructor.
 * 
 * @param file
 *            {@link java.io.File} containing resource
 */
public FileResourceStream(final java.io.File file)
{
  this.file = new File(file);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Constructor.
 * 
 * @param file
 *            {@link java.io.File} containing resource
 */
public FileResourceStream(final java.io.File file)
{
  this.file = new File(file);
}

代码示例来源:origin: apache/wicket

@Override
  public FileResourceStream getReference()
  {
    FileResourceStream fileResourceStream = new FileResourceStream(new File(fileName));
    restoreResourceStream(fileResourceStream);
    return fileResourceStream;
  }
}

代码示例来源:origin: org.apache.wicket/wicket-util

@Override
  public void track(String path, Object marker, FileDeleteStrategy deleteStrategy)
  {
    fileCleaner.track(new File(path), marker, deleteStrategy);
  }
}

代码示例来源:origin: org.opensingular/singular-requirement-commons

@Override
  protected IResourceStream getResourceStream() {
    try {
      return new FileResourceStream(new File(makeZip(logPath)));
    } catch (IOException ex) {
      getLogger().error(ex.getMessage(), ex);
    }
    return null;
  }
};

代码示例来源:origin: org.apache.wicket/wicket-util

@Override
public void track(String path, Object marker)
{
  fileCleaner.track(new File(path), marker);
}

代码示例来源:origin: org.opensingular/singular-requirement-module

@Override
  protected IResourceStream getResourceStream() {
    try {
      return new FileResourceStream(new File(makeZip(logPath)));
    } catch (IOException ex) {
      getLogger().error(ex.getMessage(), ex);
    }
    return null;
  }
};

代码示例来源:origin: org.apache.wicket/wicket-core

@Override
  public FileResourceStream getReference()
  {
    FileResourceStream fileResourceStream = new FileResourceStream(new File(fileName));
    restoreResourceStream(fileResourceStream);
    return fileResourceStream;
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
   * @see java.io.FileFilter#accept(java.io.File)
   */
  public boolean accept(java.io.File file)
  {
    return file.isFile() && filter.accept(new File(file));
  }
});

代码示例来源:origin: org.apache.wicket/wicket-util

/**
   * @see java.io.FileFilter#accept(java.io.File)
   */
  @Override
  public boolean accept(final java.io.File file)
  {
    return file.isFile() && filter.accept(new File(file));
  }
});

代码示例来源:origin: org.opensingular/singular-server-commons

@Override
  protected IResourceStream getResourceStream() {
    try {
      return new FileResourceStream(new File(makeZip(logPath)));
    } catch (IOException ex) {
      getLogger().error(ex.getMessage(), ex);
    }
    return null;
  }
};

代码示例来源:origin: de.alpharogroup/jaulp-wicket-base

@Override
  protected byte[] load() throws IOException
  {
    final String realPath = ApplicationExtensions.getRealPath(application, path);
    final File file = new File(realPath);
    final byte[] data = Files.readBytes(file);
    return data;
  }
};

代码示例来源:origin: org.jabylon/log.viewer

@Override
public List<LogFile> getLogFiles() {
  File logFile = new File(System.getProperty("karaf.data"),"log/karaf.log");
  LogFile logFileInfo = new LogFile();
  logFileInfo.setLocation(logFile.getAbsolutePath());
  return Collections.singletonList(logFileInfo);
}

代码示例来源:origin: org.geoserver.community/gs-geogig

private Component repositoryLink(String id, LogEvent item) {
  String repositoryURL = item.getRepositoryURL();
  String name = new File(repositoryURL).getName();
  Label label = new Label(id, name);
  label.add(AttributeModifier.replace("title", repositoryURL));
  return label;
}

代码示例来源:origin: apache/asterixdb

public void removeSpillFiles() throws IOException {
  File cwd = new File("./");
  String[] spills = cwd.list(SPILL_FILE_FILTER);
  for (String fileName : spills) {
    Files.delete(Paths.get(fileName));
  }
}

代码示例来源:origin: org.geoserver.web/web-wms

public void testUpload() throws Exception {
  FormTester upload = tester.newFormTester("uploadForm");
  File styleFile = new File(new java.io.File(getClass().getResource("default_point.sld").toURI()));
  String sld = IOUtils.toString(new FileReader(styleFile)).replaceAll("\r\n", "\n").replaceAll("\r", "\n");
  
  
  upload.setFile("filename", styleFile, "application/xml");
  upload.submit();
  
  tester.assertRenderedPage(StyleNewPage.class);
  tester.assertModelValue("form:SLD", sld);
}

代码示例来源:origin: org.geoserver.web/web-wms

public void testNewStyleNoSLD() throws Exception {
  
  FormTester form = tester.newFormTester("form");
  File styleFile = new File(new java.io.File(getClass().getResource("default_point.sld").toURI()));
  form.setValue("name", "test");
  form.submit();
  
  tester.assertRenderedPage(StyleNewPage.class);
  assertTrue(tester.getMessages(FeedbackMessage.ERROR).size() > 0);
}

代码示例来源:origin: org.geoserver.web/web-wms

public void testNewStyle() throws Exception {
  
  FormTester form = tester.newFormTester("form");
  File styleFile = new File(new java.io.File(getClass().getResource("default_point.sld").toURI()));
  String sld = IOUtils.toString(new FileReader(styleFile)).replaceAll("\r\n", "\n").replaceAll("\r", "\n");
  form.setValue("SLD:editorContainer:editor", sld);
  form.setValue("name", "test");
  form.submit();
  
  tester.assertRenderedPage(StylePage.class);
  assertNotNull(getCatalog().getStyleByName("test"));
}

相关文章