|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.csdn.common.io.Streams
public abstract class Streams
BlogInfo: william Date: 11-9-1 Time: 下午4:07
| Field Summary | |
|---|---|
static int |
BUFFER_SIZE
|
| Constructor Summary | |
|---|---|
Streams()
|
|
| Method Summary | |
|---|---|
static void |
copy(byte[] in,
File out)
Copy the contents of the given byte array to the given output File. |
static void |
copy(byte[] in,
OutputStream out)
Copy the contents of the given byte array to the given OutputStream. |
static long |
copy(File in,
File out)
Copy the contents of the given input File to the given output File. |
static long |
copy(InputStream in,
OutputStream out)
|
static long |
copy(InputStream in,
OutputStream out,
byte[] buffer)
Copy the contents of the given InputStream to the given OutputStream. |
static int |
copy(Reader in,
Writer out)
Copy the contents of the given Reader to the given Writer. |
static void |
copy(String in,
Writer out)
Copy the contents of the given String to the given output Writer. |
static byte[] |
copyToByteArray(InputStream in)
|
static String |
copyToString(Reader in)
Copy the contents of the given Reader into a String. |
static String |
copyToStringFromClasspath(ClassLoader classLoader,
String path)
|
static String |
copyToStringFromClasspath(String path)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_SIZE
| Constructor Detail |
|---|
public Streams()
| Method Detail |
|---|
public static long copy(File in,
File out)
throws IOException
in - the file to copy fromout - the file to copy to
IOException - in case of I/O errors
public static void copy(byte[] in,
File out)
throws IOException
in - the byte array to copy fromout - the file to copy to
IOException - in case of I/O errors
public static long copy(InputStream in,
OutputStream out)
throws IOException
IOException
public static long copy(InputStream in,
OutputStream out,
byte[] buffer)
throws IOException
in - the stream to copy fromout - the stream to copy to
IOException - in case of I/O errors
public static byte[] copyToByteArray(InputStream in)
throws IOException
IOException
public static void copy(byte[] in,
OutputStream out)
throws IOException
in - the byte array to copy fromout - the OutputStream to copy to
IOException - in case of I/O errors
public static int copy(Reader in,
Writer out)
throws IOException
in - the Reader to copy fromout - the Writer to copy to
IOException - in case of I/O errors
public static void copy(String in,
Writer out)
throws IOException
in - the String to copy fromout - the Writer to copy to
IOException - in case of I/O errors
public static String copyToString(Reader in)
throws IOException
in - the reader to copy from
IOException - in case of I/O errors
public static String copyToStringFromClasspath(ClassLoader classLoader,
String path)
throws IOException
IOException
public static String copyToStringFromClasspath(String path)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||