Groovy Documentation

groovy.org.codenarc.util.io
[Groovy] Interface Resource


interface Resource

Defines the interface for objects that represent a resource (e.g. a file) and provide access to its InputStream.

The design of this (resource) framework is heavily influenced by the Resource classes within The Spring Framework.

This is an internal class and its API is subject to change.

Authors:
Chris Mair


Method Summary
boolean exists()

@return true only if this resource exists and is accessible

InputStream getInputStream()

Return the InputStream for this resource.

 

Method Detail

exists

boolean exists()
Returns:
true only if this resource exists and is accessible


getInputStream

InputStream getInputStream()
Return the InputStream for this resource.
throws:
IOException - if an error occurs opening the InputStream


 

Groovy Documentation