// 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 com.sharethis.loopy.sdk.util.IOUtils;
import java.io.ByteArrayInputStream;
import java.io.IOException;
package com.sharethis.loopy.test;



/**
 * @author Jason Polites
 */
public class IOUtilsTest extends LoopyAndroidTestCase {

    public void testRead() throws IOException {
        String testData = "the quick brown fox jumps over the lazy dog";
        ByteArrayInputStream in0 = new ByteArrayInputStream(testData.getBytes());
        ByteArrayInputStream in1 = new ByteArrayInputStream(testData.getBytes());
// 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/IOUtilsTest.java
import com.sharethis.loopy.sdk.util.IOUtils;
import java.io.ByteArrayInputStream;
import java.io.IOException;

package com.sharethis.loopy.test;



/**
 * @author Jason Polites
 */
public class IOUtilsTest extends LoopyAndroidTestCase {

    public void testRead() throws IOException {
        String testData = "the quick brown fox jumps over the lazy dog";
        ByteArrayInputStream in0 = new ByteArrayInputStream(testData.getBytes());
        ByteArrayInputStream in1 = new ByteArrayInputStream(testData.getBytes());
        String out0 = IOUtils.read(in0, 1024);