|
||||||||||
| 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.StreamUtils
public final class StreamUtils
Helper class to perform stream operations.
| Constructor Summary | |
|---|---|
StreamUtils()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
copy(InputStream inputStream,
OutputStream outputStream)
Copies the inputStream into the outputSteam and finally
closes the both streams. |
String |
readAll(InputStream inputStream)
Reads all input into memory and return as a String. |
InputStream |
wrapString(String str)
Wraps the provided string into an InputStream. |
void |
write(String str,
OutputStream outputStream)
Writes the specified string to stream with buffering. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamUtils()
| Method Detail |
|---|
public InputStream wrapString(String str)
str - String to wrap.
public String readAll(InputStream inputStream)
throws IOException
inputStream - InputStream to read from.
IOException - if there is an problem reading from the stream.
public 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 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 | |||||||||