com.xebialabs.deployit.util
Class ExtendedResourceUtils

java.lang.Object
  extended by com.xebialabs.deployit.util.ExtendedResourceUtils

public class ExtendedResourceUtils
extends java.lang.Object

Provides a number of static methods that work on Resources.


Constructor Summary
ExtendedResourceUtils()
           
 
Method Summary
static byte[] toByteArray(org.springframework.core.io.Resource resource)
          Reads the contents of a Resource into a byte array.
static java.lang.String toString(org.springframework.core.io.Resource resource)
          Reads the contents of a Resource into a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedResourceUtils

public ExtendedResourceUtils()
Method Detail

toByteArray

public static byte[] toByteArray(org.springframework.core.io.Resource resource)
                          throws RuntimeIOException
Reads the contents of a Resource into a byte array.

Parameters:
resource - the resource.
Returns:
the byte array with the contents of the resource.
Throws:
RuntimeIOException - when an I/O error occurs.

toString

public static java.lang.String toString(org.springframework.core.io.Resource resource)
                                 throws RuntimeIOException
Reads the contents of a Resource into a String.

Parameters:
resource - the resource.
Returns:
the String with the contents of the resource.
Throws:
RuntimeIOException - when an I/O error occurs.


Copyright © 2010. All Rights Reserved.