org.skife.jdbi.tweak
Class URLScriptLocator

java.lang.Object
  extended by org.skife.jdbi.tweak.URLScriptLocator
All Implemented Interfaces:
ScriptLocator

public class URLScriptLocator
extends java.lang.Object
implements ScriptLocator

Script locator which takes a name and treats it as a URL, which it tries to open


Constructor Summary
URLScriptLocator()
           
 
Method Summary
 java.io.InputStream locate(java.lang.String name)
          Treats name as a URL, which it attempts to open
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLScriptLocator

public URLScriptLocator()
Method Detail

locate

public java.io.InputStream locate(java.lang.String name)
                           throws java.lang.Exception
Treats name as a URL, which it attempts to open

Specified by:
locate in interface ScriptLocator
Parameters:
name - URL name to extract script from.
Returns:
open input stream, or null if nothing could be found.
Throws:
java.lang.Exception - if anything goes wrong locating the statement, will be wrapped in a DBIException and rethrown