|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.component.AbstractLifeCycle org.mortbay.thread.BoundedThreadPool org.mortbay.io.IO
public class IO
IO Utilities. Provides stream handling utilities in singleton Threadpool implementation accessed by static members.
Nested Class Summary | |
---|---|
(package private) static class |
IO.Job
|
private static class |
IO.NullOS
|
private static class |
IO.NullWrite
|
private static class |
IO.Singleton
|
Nested classes/interfaces inherited from class org.mortbay.thread.BoundedThreadPool |
---|
BoundedThreadPool.PoolThread |
Field Summary | |
---|---|
private static IO.NullOS |
__nullStream
|
private static IO.NullWrite |
__nullWriter
|
static int |
bufferSize
|
static String |
CRLF
|
static byte[] |
CRLF_BYTES
|
Constructor Summary | |
---|---|
IO()
|
Method Summary | |
---|---|
static void |
close(InputStream is)
closes an input stream, and logs exceptions |
static void |
close(OutputStream os)
closes an output stream, and logs exceptions |
static void |
copy(InputStream in,
OutputStream out)
Copy Stream in to Stream out until EOF or exception. |
static void |
copy(InputStream in,
OutputStream out,
long byteCount)
Copy Stream in to Stream for byteCount bytes or until EOF or exception. |
static void |
copy(Reader in,
Writer out)
Copy Reader to Writer out until EOF or exception. |
static void |
copy(Reader in,
Writer out,
long byteCount)
Copy Reader to Writer for byteCount bytes or until EOF or exception. |
static void |
copyThread(InputStream in,
OutputStream out)
Copy Stream in to Stream out until EOF or exception. |
static void |
copyThread(Reader in,
Writer out)
Copy Stream in to Stream out until EOF or exception in own thread |
static boolean |
delete(File file)
Delete File. |
static OutputStream |
getNullStream()
|
static Writer |
getNullWriter()
|
static IO |
instance()
|
static String |
toString(InputStream in)
Read input stream to string. |
Methods inherited from class org.mortbay.thread.BoundedThreadPool |
---|
dispatch, doStart, doStop, getIdleThreads, getMaxIdleTimeMs, getMaxThreads, getMinThreads, getName, getThreads, getThreadsPriority, isDaemon, join, newThread, setDaemon, setMaxIdleTimeMs, setMaxThreads, setMinThreads, setName, setThreadsPriority, stopJob |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
---|
isFailed, isRunning, isStarted, isStarting, isStopping, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mortbay.component.LifeCycle |
---|
isFailed, isRunning, isStarted, isStarting, isStopping, start, stop |
Field Detail |
---|
public static final String CRLF
public static final byte[] CRLF_BYTES
public static int bufferSize
private static IO.NullOS __nullStream
private static IO.NullWrite __nullWriter
Constructor Detail |
---|
public IO()
Method Detail |
---|
public static IO instance()
public static void copyThread(InputStream in, OutputStream out)
public static void copy(InputStream in, OutputStream out) throws IOException
IOException
public static void copyThread(Reader in, Writer out)
public static void copy(Reader in, Writer out) throws IOException
IOException
public static void copy(InputStream in, OutputStream out, long byteCount) throws IOException
IOException
public static void copy(Reader in, Writer out, long byteCount) throws IOException
IOException
public static String toString(InputStream in) throws IOException
IOException
public static boolean delete(File file)
file
- The file to be deleted.public static void close(InputStream is)
is
- the input stream to closepublic static void close(OutputStream os)
os
- the output stream to closepublic static OutputStream getNullStream()
public static Writer getNullWriter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |