|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.melati.util.IoUtils
public final class IoUtils
IO utilities.
| Method Summary | |
|---|---|
static void |
copy(File from,
int buf,
File to)
Copy from one file to another. |
static void |
copy(InputStream i,
int buf,
OutputStream o)
Copy from an InputStream to an OutputStream. |
static void |
copy(Reader i,
int buf,
Writer o)
Copy from a Reader to a Writer. |
static byte[] |
slurp(File f,
int estimate)
Read a file into a byte array. |
static byte[] |
slurp(InputStream i,
int estimate)
Read into a byte array. |
static byte[] |
slurp(InputStream i,
int estimate,
int limit)
Read into a byte array. |
static char[] |
slurp(Reader i,
int estimate)
Read from a Reader into a byte array. |
static char[] |
slurp(Reader i,
int estimate,
int limit)
Read from a Reader into a byte array. |
static byte[] |
slurp(URL url,
int estimate)
Read an url into a byte array. |
static byte[] |
slurp(URL url,
int estimate,
int max)
Read an url into a byte array, with a limit. |
static byte[] |
slurpOutputOf_bytes(String[] command,
int estimate,
int limit)
Read the output of a system command into a byte array. |
static String |
slurpOutputOf(String[] command,
int estimate,
int limit)
Read the output of a system command into a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] slurp(InputStream i,
int estimate,
int limit)
throws IOException
i - the inputStreamestimate - approximately how biglimit - will not be bigger than
IOException
public static byte[] slurp(InputStream i,
int estimate)
throws IOException
i - the inputStreamestimate - approximately how big
IOException
public static byte[] slurp(URL url,
int estimate)
throws IOException
url - the url to readestimate - approximately how big
IOException
public static byte[] slurp(URL url,
int estimate,
int max)
throws IOException
url - the url to readestimate - approximately how bigmax - limit
IOException
public static byte[] slurp(File f,
int estimate)
throws IOException
f - file to readestimate - approximately how big
IOException
public static char[] slurp(Reader i,
int estimate,
int limit)
throws IOException
i - Reader to readestimate - approximately how biglimit - max size
IOException
public static char[] slurp(Reader i,
int estimate)
throws IOException
i - Reader to readestimate - approximately how big
IOException
public static byte[] slurpOutputOf_bytes(String[] command,
int estimate,
int limit)
throws IOException
command - the command to runestimate - approximately how biglimit - max size
IOException
public static String slurpOutputOf(String[] command,
int estimate,
int limit)
throws IOException
command - the command to runestimate - approximately how biglimit - max size
IOException
public static void copy(InputStream i,
int buf,
OutputStream o)
throws IOException
i - the InputStreambuf - the size of buffer to useo - the OutputStream
IOException
public static void copy(Reader i,
int buf,
Writer o)
throws IOException
i - the Readerbuf - the size of buffer to useo - the Writer
IOException
public static void copy(File from,
int buf,
File to)
throws IOException
from - input filebuf - the size of buffer to useto - output file
IOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||