net.krecan.m2_proxy.utils
Class ResourceUtils

java.lang.Object
  extended by net.krecan.m2_proxy.utils.ResourceUtils

public class ResourceUtils
extends Object

Utilities for coping with resources

Author:
krel

Method Summary
static void copy(File in, File out)
          Copy file
static void copy(InputStream in, OutputStream out)
          Copy data from input stream to the output stream
static String copyToString(InputStream in)
          Copy the data from the stream to the string
static String extractStringFromResource(Resource resource)
          Returns content of the resource as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public static final void copy(File in,
                              File out)
                       throws IOException
Copy file

Parameters:
in -
out -
Throws:
IOException

copy

public static final void copy(InputStream in,
                              OutputStream out)
                       throws IOException
Copy data from input stream to the output stream

Parameters:
in -
out -
Throws:
IOException

copyToString

public static final String copyToString(InputStream in)
                                 throws IOException
Copy the data from the stream to the string

Parameters:
in -
Returns:
Throws:
IOException

extractStringFromResource

public static final String extractStringFromResource(Resource resource)
                                              throws IOException
Returns content of the resource as a string

Parameters:
resource -
Returns:
Throws:
IOException


Copyright © 2006 null. All Rights Reserved.