BBOS/src/bing/Bing.java
//requestUrl formats the URL, this encodes it so it is formatted in a manner that can be interpreted properly

requestUrl formats the URL, this encodes it so it is formatted in a manner that can be interpreted properly
requestUrl formats the URL this encodes it so it is formatted in a manner that can be interpreted properly
private static String encodeUrl(String url)
	{
		byte[] bytes = null;
		try
		{
			ByteArrayOutputStream bos = new ByteArrayOutputStream();
			DataOutputStream dos = new DataOutputStream(bos);
			dos.writeUTF(url);
			bytes = bos.toByteArray();
		}
		catch (IOException e)
		{
		}
		if(bytes != null)
		{
			StringBuffer buf = new StringBuffer();
			int len = bytes.length;
			for(int i = 2; i < len; i++)
			{
				byte b = bytes[i];
				if(URL_UNRESERVED.indexOf(b) >= 0)
				{
					buf.append((char)b);
				}
				else
				{
					buf.append('%').append(HEX[(b >> 4) & 0x0f]).append(HEX[b & 0x0f]);
				}
			}
			return buf.toString();
		}
		return "";
	}
private static String encodeUrl ( String url ) { byte [ ] bytes = null ; try { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; DataOutputStream dos = new DataOutputStream ( bos ) ; dos . writeUTF ( url ) ; bytes = bos . toByteArray ( ) ; } catch ( IOException e ) { } if ( bytes != null ) { StringBuffer buf = new StringBuffer ( ) ; int len = bytes . length ; for ( int i = 2 ; i < len ; i ++ ) { byte b = bytes [ i ] ; if ( URL_UNRESERVED . indexOf ( b ) >= 0 ) { buf . append ( ( char ) b ) ; } else { buf . append ( '%' ) . append ( HEX [ ( b >> 4 ) & 0x0f ] ) . append ( HEX [ b & 0x0f ] ) ; } } return buf . toString ( ) ; } return "" ; }
requestUrl formats the URL, this encodes it so it is formatted in a manner that can be interpreted properly
requestUrl formats the URL this encodes it so it is formatted in a manner that can be interpreted properly
// ignore
