Permalink
Browse files

Updated IOUtil.getInputStream(Object) to handle InputStream objects by

returning them.
  • Loading branch information...
jmfee-usgs committed Oct 29, 2012
1 parent 4fecc84 commit 76973371c266737a119f6df1465f41143a3c6e27
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gov/usgs/earthquake/util/IOUtil.java
@@ -43,7 +43,9 @@
*/
public static InputStream getInputStream(final Object object)
throws IOException {
- if (object instanceof byte[]) {
+ if (object instanceof InputStream) {
+ return (InputStream) object;
+ } else if (object instanceof byte[]) {
return getInputStream((byte[]) object);
} else if (object instanceof String) {
return getInputStream(((String) object).getBytes());

0 comments on commit 7697337

Please sign in to comment.