org.gcube.common.scan.resources
Interface ClasspathResource

All Known Implementing Classes:
FileResource, JarEntryResource

public interface ClasspathResource

Models a ClasspathResource contained in some archive thereof included in a classpath.

Author:
Fabio Simeoni

Method Summary
 File file()
          Returns the resource as a file
 String name()
          Returns the name of the resource.
 String path()
          Returns the path of the resource, relatively to the containing archive.
 InputStream stream()
          Returns the resource as a stream.
 

Method Detail

name

String name()
Returns the name of the resource.

Returns:

path

String path()
Returns the path of the resource, relatively to the containing archive.

Returns:

stream

InputStream stream()
                   throws Exception
Returns the resource as a stream.

Returns:
the stream
Throws:
Exception - if the stream cannot be returned

file

File file()
          throws Exception
Returns the resource as a file

Returns:
the file
Throws:
Exception - if the file cannot be returned


Copyright © 2014. All Rights Reserved.