|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.util.io.Streams
public final class Streams
Utilities methods for working with input and output streams.
Method Summary | |
---|---|
static void |
close(Closeable closeable)
Closes a closeable. |
static int |
copy(InputStream in,
OutputStream out)
Writes the input stream to the output stream. |
static int |
copy(InputStream in,
OutputStream out,
int bufSize)
Writes the input stream to the output stream. |
static long |
copyAndClose(InputStream in,
OutputStream out)
Writes the input stream to the output stream. |
static void |
loadFromXml(Properties properties,
InputStream inputStream)
Loads properties from an XML input stream into the provided properties object. |
static String |
readString(InputStream in)
Reads a stream as a string. |
static String |
readString(InputStream in,
CharSequence encoding)
Reads a string using a character encoding. |
static String |
readString(Reader in)
Reads all input from a reader into a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void close(Closeable closeable) throws IOException
closeable
- closeable to close
IOException
- when close failspublic static long copyAndClose(InputStream in, OutputStream out) throws IOException
in
- The input streamout
- The output stream
IOException
public static int copy(InputStream in, OutputStream out) throws IOException
in
- The input streamout
- The output stream
IOException
public static int copy(InputStream in, OutputStream out, int bufSize) throws IOException
in
- The input streamout
- The output streambufSize
- The buffer size. A good value is 4096.
IOException
public static void loadFromXml(Properties properties, InputStream inputStream) throws IOException
properties
- The object to load the properties intoinputStream
-
IOException
- When the input stream could not be read frompublic static String readString(InputStream in) throws IOException
in
- The input stream
IOException
public static String readString(InputStream in, CharSequence encoding) throws IOException
in
- The inputencoding
- The character encoding of the input data
IOException
public static String readString(Reader in) throws IOException
in
- The input
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |