|
||||||||||
| 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 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 int |
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 InputStream |
readNonCaching(URL url)
Sets the connection to a URL as non-caching and returns the input stream. |
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 int 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 from
public static InputStream readNonCaching(URL url)
throws IOException
url - the url to read from
IOException - when a connection cannot be opened
public 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 | |||||||||