|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.common.lib.utils.Streams
public final class Streams
Helper class to perform stream operations.
| Method Summary | |
|---|---|
static void |
copy(InputStream inputStream,
OutputStream outputStream)
Copies the inputStream into the outputSteam and finally
closes the both streams. |
static String |
readAll(InputStream inputStream)
Reads all input into memory, close the steam, and return as a String. |
static InputStream |
wrapString(String str)
Wraps the provided string into an InputStream. |
static void |
write(String str,
OutputStream outputStream)
Writes the specified string to stream with buffering and closes the stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static InputStream wrapString(String str)
str - String to wrap.
public static String readAll(InputStream inputStream)
throws IOException
inputStream - InputStream to read from.
IOException - if there is an problem reading from the stream.
public static void write(String str,
OutputStream outputStream)
throws IOException
str - String to write.outputStream - Stream to write to.
IOException - If there is an exception while writing.
public static void copy(InputStream inputStream,
OutputStream outputStream)
throws IOException
inputStream into the outputSteam and finally
closes the both streams.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||