com.googlecode.flyway.core.util
Class ResourceUtils

java.lang.Object
  extended by com.googlecode.flyway.core.util.ResourceUtils

public class ResourceUtils
extends java.lang.Object

Utility class for dealing with classpath resources.


Method Summary
static java.lang.String loadResourceAsString(org.springframework.core.io.Resource resource, java.lang.String encoding)
          Loads this resource in a string using this encoding.
static java.lang.String loadResourceAsString(java.lang.String location)
          Loads the resource at this location within the classpath in a string using UTF-8 encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadResourceAsString

public static java.lang.String loadResourceAsString(java.lang.String location)
Loads the resource at this location within the classpath in a string using UTF-8 encoding.

Parameters:
location - The location of the resource on the classpath.
Returns:
The resource contents as a string.

loadResourceAsString

public static java.lang.String loadResourceAsString(org.springframework.core.io.Resource resource,
                                                    java.lang.String encoding)
Loads this resource in a string using this encoding.

Parameters:
resource - The resource to load.
encoding - The encoding of the resource.
Returns:
The resource contents as a string.


Copyright © 2010. All Rights Reserved.