List of usage examples for org.apache.wicket.util.file File inputStream
public InputStream inputStream() throws FileNotFoundException
From source file:org.artifactory.webapp.wicket.resource.LogoResource.java
License:Open Source License
@Override protected byte[] getImageData(Attributes attributes) { InputStream inputStream = null; try {//from www . ja v a2 s . c o m File file = new File(artifactoryHome.getLogoDir(), "logo"); inputStream = file.inputStream(); return IOUtils.toByteArray(inputStream); } catch (IOException e) { throw new RuntimeException("Can't read image file", e); } finally { IOUtils.closeQuietly(inputStream); } }