Package org.apache.axiom.util.io
Class IOUtils
- java.lang.Object
-
- org.apache.axiom.util.io.IOUtils
-
public final class IOUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
copy(InputStream in, OutputStream out, long length)
Copy bytes between streams.
-
-
-
Method Detail
-
copy
public static long copy(InputStream in, OutputStream out, long length) throws StreamCopyException
Copy bytes between streams. This method supports theReadFromSupport
interface. It will not callCloseable.close()
on either of the two streams.- Parameters:
in
- the stream to read bytes fromout
- the stream to write bytes tolength
- the maximum number of bytes to copy, or -1 to copy an unlimited number of bytes- Returns:
- the number of bytes copied
- Throws:
StreamCopyException
- if a read/write operation on one of the streams triggered anIOException
-
-