Package org.jboss.forge.roaster
Class Streams
- java.lang.Object
-
- org.jboss.forge.roaster.Streams
-
public abstract class Streams extends java.lang.ObjectVarious stream utilities.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringtoString(java.io.InputStream stream)Return aStringcontaining the contents of the givenInputStream.static voidwrite(java.io.InputStream source, java.io.OutputStream destination)Writes the content of the source stream to the destination stream.
-
-
-
Method Detail
-
toString
public static java.lang.String toString(java.io.InputStream stream)
Return aStringcontaining the contents of the givenInputStream. The caller is responsible to close the stream.- Parameters:
stream- the stream to read from- Returns:
- the content of the stream
- Throws:
java.lang.RuntimeException- if aIOExceptionoccurs
-
write
public static void write(java.io.InputStream source, java.io.OutputStream destination)Writes the content of the source stream to the destination stream. The caller is responsible to close the streams.- Parameters:
source- the source stream to read fromdestination- the destination stream to write to- Throws:
java.lang.RuntimeException- if aIOExceptionoccurs.
-
-