|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ftpserver.util.IoUtils
public class IoUtils
IO utility methods.
Constructor Summary | |
---|---|
IoUtils()
|
Method Summary | |
---|---|
static void |
close(InputStream is)
No exception InputStream close method. |
static void |
close(OutputStream os)
No exception OutputStream close method. |
static void |
close(Reader rd)
No exception java.io.Reader close method. |
static void |
close(Writer wr)
No exception java.io.Writer close method. |
static void |
copy(InputStream input,
OutputStream output,
int bufferSize)
Copy chars from a InputStream to a OutputStream . |
static void |
copy(Reader input,
Writer output,
int bufferSize)
Copy chars from a Reader to a Writer . |
static BufferedInputStream |
getBufferedInputStream(InputStream in)
Get a BufferedInputStream . |
static BufferedOutputStream |
getBufferedOutputStream(OutputStream out)
Get a BufferedOutputStream . |
static BufferedReader |
getBufferedReader(Reader rd)
Get BufferedReader . |
static BufferedWriter |
getBufferedWriter(Writer wr)
Get BufferedWriter . |
static String |
getStackTrace(Throwable ex)
Get exception stack trace. |
static File |
getUniqueFile(File oldFile)
Get unique file object. |
static String |
readFully(InputStream input)
Read fully from stream |
static String |
readFully(Reader reader)
Read fully from reader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IoUtils()
Method Detail |
---|
public static BufferedInputStream getBufferedInputStream(InputStream in)
BufferedInputStream
.
public static BufferedOutputStream getBufferedOutputStream(OutputStream out)
BufferedOutputStream
.
public static BufferedReader getBufferedReader(Reader rd)
BufferedReader
.
public static BufferedWriter getBufferedWriter(Writer wr)
BufferedWriter
.
public static File getUniqueFile(File oldFile)
public static void close(InputStream is)
InputStream
close method.
public static void close(OutputStream os)
OutputStream
close method.
public static void close(Reader rd)
java.io.Reader
close method.
public static void close(Writer wr)
java.io.Writer
close method.
public static String getStackTrace(Throwable ex)
public static void copy(Reader input, Writer output, int bufferSize) throws IOException
Reader
to a Writer
.
bufferSize
- Size of internal buffer to use.
IOException
public static void copy(InputStream input, OutputStream output, int bufferSize) throws IOException
InputStream
to a OutputStream
.
bufferSize
- Size of internal buffer to use.
IOException
public static String readFully(Reader reader) throws IOException
IOException
public static String readFully(InputStream input) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |