|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.libs.IO
public class IO
IO utils
| Constructor Summary | |
|---|---|
IO()
|
|
| Method Summary | |
|---|---|
static byte[] |
readContent(File file)
Read binary content of a file (warning does not use on large file !) |
static byte[] |
readContent(InputStream is)
Read binary content of a stream (warning does not use on large file !) |
static String |
readContentAsString(File file)
Read file content to a String (always use utf-8) |
static String |
readContentAsString(InputStream is)
Read the Stream content as a string (always use utf-8) |
static Properties |
readUtf8Properties(InputStream is)
Read a properties file with the utf-8 encoding |
static void |
write(byte[] data,
File file)
Write binay data to a file |
static void |
write(InputStream is,
OutputStream os)
Copy an stream to another one. |
static void |
writeContent(CharSequence content,
File file)
Write String content to a file (always use utf-8) |
static void |
writeContent(CharSequence content,
OutputStream os)
Write String content to a stream (always use utf-8) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IO()
| Method Detail |
|---|
public static Properties readUtf8Properties(InputStream is)
throws IOException
is - Stream to properties file
IOException
public static String readContentAsString(InputStream is)
throws IOException
is - The stream to read
IOException
public static String readContentAsString(File file)
throws IOException
file - The file to read
IOException
public static byte[] readContent(File file)
throws IOException
file - The file te read
IOException
public static byte[] readContent(InputStream is)
throws IOException
is - The stream to read
IOException
public static void writeContent(CharSequence content,
OutputStream os)
throws IOException
content - The content to writeos - The stream to write
IOException
public static void writeContent(CharSequence content,
File file)
throws IOException
content - The content to writefile - The file to write
IOException
public static void write(byte[] data,
File file)
throws IOException
data - The binary data to writefile - The file to write
IOException
public static void write(InputStream is,
OutputStream os)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||