| org.mortbay.thread.BoundedThreadPool org.mortbay.util.IO
IO | public class IO extends BoundedThreadPool (Code) | | IO Utilities.
Provides stream handling utilities in
singleton Threadpool implementation accessed by static members.
|
Inner Class :static class Job implements Runnable | |
Method Summary | |
public static void | close(InputStream is) | public static void | close(OutputStream os) | public static void | copy(InputStream in, OutputStream out) Copy Stream in to Stream out until EOF or exception. | public static void | copy(Reader in, Writer out) Copy Reader to Writer out until EOF or exception. | public static void | copy(InputStream in, OutputStream out, long byteCount) Copy Stream in to Stream for byteCount bytes or until EOF or exception. | public static void | copy(Reader in, Writer out, long byteCount) Copy Reader to Writer for byteCount bytes or until EOF or exception. | public static void | copy(File from, File to) | public static void | copyDir(File from, File to) | public static void | copyFile(File from, File to) | public static void | copyThread(InputStream in, OutputStream out) Copy Stream in to Stream out until EOF or exception. | public static void | copyThread(Reader in, Writer out) | public static boolean | delete(File file) Delete File. | public static OutputStream | getNullStream() | public static Writer | getNullWriter() | public static IO | instance() | public static byte[] | readBytes(InputStream in) | public static String | toString(InputStream in) Read input stream to string. |
CRLF_BYTES | final public static byte[] CRLF_BYTES(Code) | | |
bufferSize | public static int bufferSize(Code) | | |
close | public static void close(InputStream is)(Code) | | closes an input stream, and logs exceptions
Parameters: is - the input stream to close |
close | public static void close(OutputStream os)(Code) | | closes an output stream, and logs exceptions
Parameters: os - the output stream to close |
copy | public static void copy(Reader in, Writer out, long byteCount) throws IOException(Code) | | Copy Reader to Writer for byteCount bytes or until EOF or exception.
|
copyThread | public static void copyThread(InputStream in, OutputStream out)(Code) | | Copy Stream in to Stream out until EOF or exception.
in own thread
|
copyThread | public static void copyThread(Reader in, Writer out)(Code) | | Copy Stream in to Stream out until EOF or exception
in own thread
|
delete | public static boolean delete(File file)(Code) | | Delete File.
This delete will recursively delete directories - BE CAREFULL
Parameters: file - The file to be deleted. |
getNullWriter | public static Writer getNullWriter()(Code) | | An writer to nowhere |
instance | public static IO instance()(Code) | | |
|
|