org.n52.security.common.util
Class FileFinder

java.lang.Object
  extended by org.n52.security.common.util.FileFinder

public class FileFinder
extends Object

Helps to encapsulate the typical search of a file.

todo: maybe we can align the resource concept of spring to such tasks.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 24.07.2008

Constructor Summary
FileFinder()
           
FileFinder(String fileName)
           
 
Method Summary
 File getFile()
          Gets the file for a given file name.
 String getFileName()
           
 InputStream getInputStream()
          Method gets the inputStream for a given file name.
 void setFileName(String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFinder

public FileFinder()

FileFinder

public FileFinder(String fileName)
Method Detail

getFileName

public String getFileName()

setFileName

public void setFileName(String fileName)

getInputStream

public InputStream getInputStream()
Method gets the inputStream for a given file name.

Works not with directories. (self explaining or). But it is able to get strems from files within jars.

Returns:
InputStream.

getFile

public File getFile()
Gets the file for a given file name.

It checks the existence of the file, but this can be a directory, too.

Returns:
File.


Copyright © 2004–2014 52north.org. All rights reserved.