mirror of https://github.com/apache/jclouds.git
JCLOUDS-622: add Strings2.toString(InputSupplier)
We did not deprecate this in 1.7.x as previously thought.
This commit is contained in:
parent
1fb286809e
commit
0df905a870
|
@ -41,6 +41,7 @@ import com.google.common.cache.CacheLoader;
|
|||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.io.CharStreams;
|
||||
import com.google.common.io.InputSupplier;
|
||||
import com.google.common.primitives.Chars;
|
||||
|
||||
public class Strings2 {
|
||||
|
@ -121,6 +122,13 @@ public class Strings2 {
|
|||
}
|
||||
}
|
||||
|
||||
/** @deprecated use CharSource.read() instead */
|
||||
@Deprecated
|
||||
public static String toString(InputSupplier<? extends InputStream> supplier)
|
||||
throws IOException {
|
||||
return toStringAndClose(supplier.getInput());
|
||||
}
|
||||
|
||||
public static String toStringAndClose(InputStream input) throws IOException {
|
||||
checkNotNull(input, "input");
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue