// Path: sdk/src/com/sharethis/loopy/sdk/util/IOUtils.java
// public class IOUtils {
// 
// 	/**
// 	 * Pipes input bytes to output.
// 	 * @param in The IN stream
// 	 * @param out The OUT stream
// 	 * @param bufferSize The buffer size
// 	 * @return The number of bytes written.
// 	 * @throws IOException
// 	 */
// 	public static long pipe(InputStream in, OutputStream out, int bufferSize) throws IOException {
// 		int read;
// 		long total = 0L;
// 		byte[] buffer = new byte[bufferSize];
// 		while((read = in.read(buffer)) >= 0) {
// 			total+=read;
// 			out.write(buffer, 0, read);
// 		}
// 		out.flush();
// 		return total;
// 	}
// 
// 	public static String read(InputStream in, int bufferSize) throws IOException {
// 		ByteArrayOutputStream bout = new ByteArrayOutputStream();
// 		pipe(in, bout, bufferSize);
// 		return new String(bout.toByteArray(), "utf-8");
// 	}
// 
// }


import android.content.Context;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Handler;
import android.test.ActivityTestCase;
import android.view.View;
import com.sharethis.loopy.sdk.util.IOUtils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import static junit.framework.Assert.fail;
package com.sharethis.loopy.test.util;




/**
 * @author Jason Polites
 */
public class TestUtils {

	public static InputStream getAssetStream(Context context, String name) throws IOException {
		return context.getAssets().open(name);
	}

	public static String getAssetFile(Context context, String name) {
		try {
			InputStream in = context.getAssets().open(name);
			ByteArrayOutputStream bout = new ByteArrayOutputStream();
// Path: sdk/src/com/sharethis/loopy/sdk/util/IOUtils.java
// public class IOUtils {
// 
// 	/**
// 	 * Pipes input bytes to output.
// 	 * @param in The IN stream
// 	 * @param out The OUT stream
// 	 * @param bufferSize The buffer size
// 	 * @return The number of bytes written.
// 	 * @throws IOException
// 	 */
// 	public static long pipe(InputStream in, OutputStream out, int bufferSize) throws IOException {
// 		int read;
// 		long total = 0L;
// 		byte[] buffer = new byte[bufferSize];
// 		while((read = in.read(buffer)) >= 0) {
// 			total+=read;
// 			out.write(buffer, 0, read);
// 		}
// 		out.flush();
// 		return total;
// 	}
// 
// 	public static String read(InputStream in, int bufferSize) throws IOException {
// 		ByteArrayOutputStream bout = new ByteArrayOutputStream();
// 		pipe(in, bout, bufferSize);
// 		return new String(bout.toByteArray(), "utf-8");
// 	}
// 
// }


// Path: test/src/com/sharethis/loopy/test/util/TestUtils.java
import android.content.Context;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Handler;
import android.test.ActivityTestCase;
import android.view.View;
import com.sharethis.loopy.sdk.util.IOUtils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import static junit.framework.Assert.fail;

package com.sharethis.loopy.test.util;




/**
 * @author Jason Polites
 */
public class TestUtils {

	public static InputStream getAssetStream(Context context, String name) throws IOException {
		return context.getAssets().open(name);
	}

	public static String getAssetFile(Context context, String name) {
		try {
			InputStream in = context.getAssets().open(name);
			ByteArrayOutputStream bout = new ByteArrayOutputStream();
			IOUtils.pipe(in, bout, 2048);