org.apache.commons.classscan
Interface ResourceFile

All Known Subinterfaces:
ClassFile
All Known Implementing Classes:
FileClassFile, FileResourceFile, JarClassFile, JarResourceFile

public interface ResourceFile

Information about and access to a location that contains a class or a resource.
IMPORTANT: Do not hold onto instances. There maybe open file or network resources associated with these instances.


Method Summary
 InputStream getBytes()
          Get the stream of bytes for the resource.
 String getFileName()
          Get the relative file name;
 

Method Detail

getFileName

String getFileName()
Get the relative file name;

Returns:
The resource name relative to the ClassPathElement base

getBytes

InputStream getBytes()
                     throws IOException
Get the stream of bytes for the resource.

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.