org.fcrepo.server.rest
Class CopyUtils

java.lang.Object
  extended by org.fcrepo.server.rest.CopyUtils

public class CopyUtils
extends Object

This is taken from org.apache.commons.io.CopyUtils so Apache liciense applied


Constructor Summary
CopyUtils()
           
 
Method Summary
static int copy(InputStream input, OutputStream output)
          Copy bytes from an InputStream to an OutputStream.
static int copy(Reader input, Writer output)
          Copy chars from a <code>Reader to a <code>Writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyUtils

public CopyUtils()
Method Detail

copy

public static int copy(InputStream input,
                       OutputStream output)
                throws IOException
Copy bytes from an InputStream to an OutputStream.

Parameters:
input - the InputStream to read from
output - the OutputStream to write to
Returns:
the number of bytes copied
Throws:
IOException - In case of an I/O problem

copy

public static int copy(Reader input,
                       Writer output)
                throws IOException
Copy chars from a <code>Reader to a <code>Writer
Parameters:
input - the <code>Reader to read from
output - the <code>Writer to write to
Returns:
the number of characters copied
Throws:
IOException - In case of an I/O problem


Copyright © 2011 DuraSpace. All Rights Reserved.