|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.common.tools.StreamTools
public class StreamTools
Tools for stream manipulation.
Version History
EPG - Initial - 14 MAR 05
Constructor Summary | |
---|---|
StreamTools()
|
Method Summary | |
---|---|
static java.lang.String |
loadStream2String(java.io.InputStream is)
Read a stream into a String. |
static boolean |
merge(java.io.Reader input,
java.io.Writer output,
ThingsPropertyViewReader props)
Merge a reader with properties to writer. |
static boolean |
merge(java.io.Reader input,
java.io.Writer output,
ThingsPropertyViewReader props,
StringPoster log)
Merge a reader with properties to writer. |
static void |
string2File(java.lang.String theString,
java.io.File destination)
Write a string to file using default encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamTools()
Method Detail |
---|
public static boolean merge(java.io.Reader input, java.io.Writer output, ThingsPropertyViewReader props, StringPoster log)
Exceptions are logged, not thrown.
input
- A Reader source.output
- A Writer destination.props
- Properties that are candidates for substitution.log
- A StringPoster for posting error or information messages.
StringPoster
public static boolean merge(java.io.Reader input, java.io.Writer output, ThingsPropertyViewReader props) throws java.lang.Throwable
Any error will throw an exception.
input
- A Reader source.output
- A Writer destination.props
- Properties that are candidates for substitution.
java.lang.Throwable
StringPoster
public static java.lang.String loadStream2String(java.io.InputStream is) throws java.io.IOException
is
- The stream to load. It should be buffered before calling this,
Certain
- IOException, like if the file cannot be found or opened.
java.io.IOException
public static void string2File(java.lang.String theString, java.io.File destination) throws java.io.IOException
theString
- The stringdestination
- The file destination
Certain
- IOException, like if the file cannot be found or opened.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |