org.apache.fop.tools
Class IOUtil
java.lang.Object
org.apache.fop.tools.IOUtil
- public class IOUtil
- extends Object
I/O utilities. This class should be replaced as soon as Jakarta Commons IO
announces its first release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IOUtil
public IOUtil()
copyStream
public static void copyStream(InputStream in,
OutputStream out)
throws IOException
- Copies the contents of the InputStream over to the OutputStream. This
method doesn't close the streams.
- Parameters:
in
- InputStream to read fromout
- OutputStream to write to
- Throws:
IOException
- In case of an I/O problem
toByteArray
public static byte[] toByteArray(InputStream in,
int initialTargetBufferSize)
throws IOException
- Loads the contents of the InputStream to a byte array. The InputStream
isn't closed.
- Parameters:
in
- InputStream to read frominitialTargetBufferSize
- initial number of bytes to allocate
(expected size to avoid a lot of reallocations)
- Returns:
- byte[] the array of bytes requested
- Throws:
IOException
- In case of an I/O problem
Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.