org.apache.ws.util
Class IoUtils

java.lang.Object
  extended byorg.apache.ws.util.IoUtils

public abstract class IoUtils
extends java.lang.Object

Generic I/O utility methods.

Author:
Ian Springer, Sal Campana

Constructor Summary
IoUtils()
           
 
Method Summary
static void copy(java.io.InputStream in, java.io.OutputStream out)
          Copies an input stream to an output stream.
static java.io.ByteArrayInputStream toByteArrayInputStream(java.io.ByteArrayOutputStream out)
          Converts a ByteArrayOutputStream into a ByteArrayInputStream.
static java.io.InputStream toInputStream(java.lang.String str)
          Convert the specified string to an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoUtils

public IoUtils()
Method Detail

copy

public static void copy(java.io.InputStream in,
                        java.io.OutputStream out)
                 throws java.io.IOException
Copies an input stream to an output stream.

Parameters:
in - an input stream; must not be null
out - an output stream; must not be null
Throws:
java.io.IOException - if the copy fails

toByteArrayInputStream

public static java.io.ByteArrayInputStream toByteArrayInputStream(java.io.ByteArrayOutputStream out)
Converts a ByteArrayOutputStream into a ByteArrayInputStream.

Parameters:
out -
Returns:
ByteArrayInputStream

toInputStream

public static java.io.InputStream toInputStream(java.lang.String str)
Convert the specified string to an input stream.

Parameters:
str - a string
Returns:
an input stream


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.