org.mortbay.util
public class IO extends ThreadPool
Field Summary | |
---|---|
static int | bufferSize |
static String | CRLF |
static byte[] | CRLF_BYTES |
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(Reader in, Writer out) Copy Reader to Writer 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, 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.
in own thread |
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() |
void | handle(Object o) Run copy for copyThread() |
static IO | instance() |
static String | toString(InputStream in) Read input stream to string. |
Parameters: is the input stream to close
Parameters: os the output stream to close
Returns: TODO
Returns: Copied bytes count or -1 if no bytes were read *and* EOF was reached
Parameters: file The file to be deleted.
Returns: An outputstream to nowhere
Returns: An writer to nowhere