ca.krasnay.scaffold.io
Class ResourceSource

java.lang.Object
  extended by ca.krasnay.scaffold.io.ResourceSource
All Implemented Interfaces:
Source

public class ResourceSource
extends Object
implements Source


Constructor Summary
ResourceSource(Class<?> clazz, String resourceName)
           
 
Method Summary
 void close(InputStream in)
          Closes the given input stream.
 InputStream getInputStream()
          Returns a new input stream on the source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceSource

public ResourceSource(Class<?> clazz,
                      String resourceName)
Method Detail

getInputStream

public InputStream getInputStream()
Description copied from interface: Source
Returns a new input stream on the source.

Specified by:
getInputStream in interface Source

close

public void close(InputStream in)
Description copied from interface: Source
Closes the given input stream.

Specified by:
close in interface Source
Parameters:
in - Stream returned by Source.getInputStream(). May be null.


Copyright © 2015. All rights reserved.