java.lang.Object
org.mortbay.util.ThreadPool
org.mortbay.util.IO
- All Implemented Interfaces:
- LifeCycle, java.io.Serializable
- public class IO
- extends ThreadPool
IO Utilities.
Provides stream handling utilities in
singleton Threadpool implementation accessed by static members.
| Methods inherited from class org.mortbay.util.ThreadPool |
getIdleThreads, getMaxIdleTimeMs, getMaxThreads, getMinThreads, getName, getPoolName, getThreads, getThreadsPriority, isDaemon, isStarted, join, run, setDaemon, setMaxIdleTimeMs, setMaxStopTimeMs, setMaxThreads, setMinThreads, setName, setPoolName, setThreadsPriority, shrink, start, stop, stopJob |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
CRLF
public static final java.lang.String CRLF
- See Also:
- Constant Field Values
CRLF_BYTES
public static final byte[] CRLF_BYTES
bufferSize
public static int bufferSize
__nullStream
private static IO.NullOS __nullStream
__nullWriter
private static IO.NullWrite __nullWriter
IO
public IO()
instance
public static IO instance()
copyThread
public static void copyThread(java.io.InputStream in,
java.io.OutputStream out)
- Copy Stream in to Stream out until EOF or exception.
in own thread
copy
public static void copy(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
- Copy Stream in to Stream out until EOF or exception.
copyThread
public static void copyThread(java.io.Reader in,
java.io.Writer out)
- Copy Stream in to Stream out until EOF or exception
in own thread
copy
public static void copy(java.io.Reader in,
java.io.Writer out)
throws java.io.IOException
- Copy Reader to Writer out until EOF or exception.
copy
public static void copy(java.io.InputStream in,
java.io.OutputStream out,
long byteCount)
throws java.io.IOException
- Copy Stream in to Stream for byteCount bytes or until EOF or exception.
copy
public static void copy(java.io.Reader in,
java.io.Writer out,
long byteCount)
throws java.io.IOException
- Copy Reader to Writer for byteCount bytes or until EOF or exception.
toString
public static java.lang.String toString(java.io.InputStream in)
throws java.io.IOException
- Read input stream to string.
delete
public static boolean delete(java.io.File file)
- Delete File.
This delete will recursively delete directories - BE CAREFULL
handle
public void handle(java.lang.Object o)
- Run copy for copyThread()
- Overrides:
handle in class ThreadPool
getNullStream
public static java.io.OutputStream getNullStream()
getNullWriter
public static java.io.Writer getNullWriter()