// Path: src/main/java/com/googlecode/batchfb/BinaryParam.java
// public class BinaryParam extends Param {
// 	
// 	public final String contentType;
// 	
// 	/**
// 	 */
// 	public BinaryParam(String name, InputStream value, String contentType) {
// 		super(name, value);
// 		this.contentType = contentType;
// 	}
// 	
// 	/**
// 	 * @see java.lang.Object#toString()
// 	 */
// 	@Override
// 	public String toString() {
// 		return String.format("%s[%s=%s]", this.getClass().getName(), name, contentType);
// 	}
// }
// 
// Path: src/main/java/com/googlecode/batchfb/Param.java
// public class Param {
// 
//   /** */
//   public final String name;
// 
//   /** Will be turned into a string (possibly json-mapped) later */
//   public final Object value;
// 
//   /**
//    * @param value must be something that can be converted to a String with toString().
//    */
//   public Param(String name, Object value) {
//     this.name = name;
//     this.value = value;
//   }
// 
//   /**
//    * @return a version useful for debugging.
//    */
//   @Override
//   public String toString() {
//     return String.format("%s[%s=%s]", this.getClass().getName(), name, value);
//   }
// }


import com.fasterxml.jackson.databind.ObjectMapper;
import com.googlecode.batchfb.BinaryParam;
import com.googlecode.batchfb.Param;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Date;

/*
 * Copyright (c) 2010 Jeff Schnitzer.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.googlecode.batchfb.util;



/**
 * Some string handling utilities
 */
public final class StringUtils
{
	/**
	 * Masks the useless checked exception from URLEncoder.encode()
	 */
	public static String urlEncode(String string) {

// Path: src/main/java/com/googlecode/batchfb/BinaryParam.java
// public class BinaryParam extends Param {
// 	
// 	public final String contentType;
// 	
// 	/**
// 	 */
// 	public BinaryParam(String name, InputStream value, String contentType) {
// 		super(name, value);
// 		this.contentType = contentType;
// 	}
// 	
// 	/**
// 	 * @see java.lang.Object#toString()
// 	 */
// 	@Override
// 	public String toString() {
// 		return String.format("%s[%s=%s]", this.getClass().getName(), name, contentType);
// 	}
// }
// 
// Path: src/main/java/com/googlecode/batchfb/Param.java
// public class Param {
// 
//   /** */
//   public final String name;
// 
//   /** Will be turned into a string (possibly json-mapped) later */
//   public final Object value;
// 
//   /**
//    * @param value must be something that can be converted to a String with toString().
//    */
//   public Param(String name, Object value) {
//     this.name = name;
//     this.value = value;
//   }
// 
//   /**
//    * @return a version useful for debugging.
//    */
//   @Override
//   public String toString() {
//     return String.format("%s[%s=%s]", this.getClass().getName(), name, value);
//   }
// }


// Path: src/main/java/com/googlecode/batchfb/util/StringUtils.java
import com.fasterxml.jackson.databind.ObjectMapper;
import com.googlecode.batchfb.BinaryParam;
import com.googlecode.batchfb.Param;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Date;

/*
 * Copyright (c) 2010 Jeff Schnitzer.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.googlecode.batchfb.util;



/**
 * Some string handling utilities
 */
public final class StringUtils
{
	/**
	 * Masks the useless checked exception from URLEncoder.encode()
	 */
	public static String urlEncode(String string) {

		try {
