|
||||||||||
| 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(java.io.File from,
int buf,
java.io.File to)
Copy from one file to another. |
static void |
copy(java.io.InputStream i,
int buf,
java.io.OutputStream o)
Copy from an InputStream to an OutputStream. |
static void |
copy(java.io.Reader i,
int buf,
java.io.Writer o)
Copy from a Reader to a Writer. |
static byte[] |
slurp(java.io.File f,
int estimate)
Read a file into a byte array. |
static byte[] |
slurp(java.io.InputStream i,
int estimate)
Read into a byte array. |
static byte[] |
slurp(java.io.InputStream i,
int estimate,
int limit)
Read into a byte array. |
static char[] |
slurp(java.io.Reader i,
int estimate)
Read from a Reader into a byte array. |
static char[] |
slurp(java.io.Reader i,
int estimate,
int limit)
Read from a Reader into a byte array. |
static byte[] |
slurp(java.net.URL url,
int estimate)
Read an url into a byte array. |
static byte[] |
slurp(java.net.URL url,
int estimate,
int max)
Read an url into a byte array, with a limit. |
static byte[] |
slurpOutputOf_bytes(java.lang.String[] command,
int estimate,
int limit)
Read the output of a system command into a byte array. |
static java.lang.String |
slurpOutputOf(java.lang.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(java.io.InputStream i,
int estimate,
int limit)
throws java.io.IOException
i - the inputStreamestimate - approximately how biglimit - will not be bigger than
java.io.IOException
public static byte[] slurp(java.io.InputStream i,
int estimate)
throws java.io.IOException
i - the inputStreamestimate - approximately how big
java.io.IOException
public static byte[] slurp(java.net.URL url,
int estimate)
throws java.io.IOException
url - the url to readestimate - approximately how big
java.io.IOException
public static byte[] slurp(java.net.URL url,
int estimate,
int max)
throws java.io.IOException
url - the url to readestimate - approximately how bigmax - limit
java.io.IOException
public static byte[] slurp(java.io.File f,
int estimate)
throws java.io.IOException
f - file to readestimate - approximately how big
java.io.IOException
public static char[] slurp(java.io.Reader i,
int estimate,
int limit)
throws java.io.IOException
i - Reader to readestimate - approximately how biglimit - max size
java.io.IOException
public static char[] slurp(java.io.Reader i,
int estimate)
throws java.io.IOException
i - Reader to readestimate - approximately how big
java.io.IOException
public static byte[] slurpOutputOf_bytes(java.lang.String[] command,
int estimate,
int limit)
throws java.io.IOException
command - the command to runestimate - approximately how biglimit - max size
java.io.IOException
public static java.lang.String slurpOutputOf(java.lang.String[] command,
int estimate,
int limit)
throws java.io.IOException
command - the command to runestimate - approximately how biglimit - max size
java.io.IOException
public static void copy(java.io.InputStream i,
int buf,
java.io.OutputStream o)
throws java.io.IOException
i - the InputStreambuf - the size of buffer to useo - the OutputStream
java.io.IOException
public static void copy(java.io.Reader i,
int buf,
java.io.Writer o)
throws java.io.IOException
i - the Readerbuf - the size of buffer to useo - the Writer
java.io.IOException
public static void copy(java.io.File from,
int buf,
java.io.File to)
throws java.io.IOException
from - input filebuf - the size of buffer to useto - output file
java.io.IOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||