Problemas com codificacao

0 respostas
G

Pessoal, seguinte:

Meu programa esta parseando com um site, e as informacoes que eu tiro do site sao carregados no console.
Porem esta aparecendo assim, Produto: Smartphone Apple iPhone 5 16GB Desbloqueado por “at&ea.cute(sem o ponto);” R$ 3.400,00".
Gostaria de saber como posso substituir esse ““at&ea.cute(sem o ponto);”” por um até

Grato

Abaixo esta meu codigo:

public static void main(String[] args) throws Exception {

DefaultHttpClient httpclient = new DefaultHttpClient();
String busca = "Iphone";
HttpGet httpGet = new HttpGet("http://www.buscape.com.br/cprocura/"+busca+".html");

    try {
ResponseHandler<String> manipulador = new BasicResponseHandler();
String resposta = httpclient.execute(httpGet,manipulador);


        

int inicio = resposta.indexOf("at&eacute;:");
        while(inicio != -1){
        	resposta = resposta.substring(inicio);
        	String titulo = resposta.substring(resposta.indexOf("at&eacute;:"), resposta.indexOf("/span"));
        	
            
            titulo = titulo.substring(titulo.indexOf("title"),titulo.indexOf("href"));
            
        	
            titulo = titulo.substring(titulo.indexOf(">")+8);
            System.out.println("Produto: "+titulo);
        	resposta = resposta.substring(resposta.indexOf("at&eacute;:")+1);
            
            inicio = resposta.indexOf("at&eacute;:");
        }
 
 
  } finally {
        httpGet.releaseConnection();
    }
}
Criado 30 de maio de 2013
Respostas 0
Participantes 1