org.apache.commons.classscan.builtin
Class FileResourceFile

java.lang.Object
  extended by org.apache.commons.classscan.builtin.FileResourceFile
All Implemented Interfaces:
ResourceFile
Direct Known Subclasses:
FileClassFile

public class FileResourceFile
extends Object
implements ResourceFile


Constructor Summary
FileResourceFile(File location, String relativePath)
           
 
Method Summary
 InputStream getBytes()
          Get the stream of bytes for the resource.
 String getFileName()
          Get the relative file name;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResourceFile

public FileResourceFile(File location,
                        String relativePath)
Method Detail

getFileName

public String getFileName()
Description copied from interface: ResourceFile
Get the relative file name;

Specified by:
getFileName in interface ResourceFile
Returns:
The resource name relative to the ClassPathElement base

getBytes

public InputStream getBytes()
                     throws IOException
Description copied from interface: ResourceFile
Get the stream of bytes for the resource.

Specified by:
getBytes in interface ResourceFile
Returns:
The InputStream to read resource bytes. This stream should be closed when all bytes have been read.
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.