|
||||||||||
| 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(java.io.Closeable closeable)
Closes a closeable. |
static int |
copy(java.io.InputStream in,
java.io.OutputStream out)
Writes the input stream to the output stream. |
static int |
copy(java.io.InputStream in,
java.io.OutputStream out,
int bufSize)
Writes the input stream to the output stream. |
static void |
loadFromXml(java.util.Properties properties,
java.io.InputStream inputStream)
Loads properties from an XML input stream into the provided properties object. |
static java.lang.String |
readString(java.io.InputStream in)
Reads a stream as a string. |
static java.lang.String |
readString(java.io.InputStream in,
java.lang.CharSequence encoding)
Reads a string using a character encoding. |
static java.lang.String |
readString(java.io.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(java.io.Closeable closeable)
throws java.io.IOException
closeable - closeable to close
java.io.IOException - when close fails
public static int copy(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - The input streamout - The output stream
java.io.IOException
public static int copy(java.io.InputStream in,
java.io.OutputStream out,
int bufSize)
throws java.io.IOException
in - The input streamout - The output streambufSize - The buffer size. A good value is 4096.
java.io.IOException
public static void loadFromXml(java.util.Properties properties,
java.io.InputStream inputStream)
throws java.io.IOException
properties - The object to load the properties intoinputStream -
java.io.IOException - When the input stream could not be read from
public static java.lang.String readString(java.io.InputStream in)
throws java.io.IOException
in - The input stream
java.io.IOException
public static java.lang.String readString(java.io.InputStream in,
java.lang.CharSequence encoding)
throws java.io.IOException
in - The inputencoding - The character encoding of the input data
java.io.IOException
public static java.lang.String readString(java.io.Reader in)
throws java.io.IOException
in - The input
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||