users@jersey.java.net

[Jersey] Re: Android and jersey problem

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Fri, 05 Aug 2011 07:58:03 +0200

hello,

can you share that exception? ideally with complete code snippet or
minimal reproducible testcase?

regards,
pavel

On 8/5/11 5:16 AM, Airton Pereira wrote:
> Friends,
>
> I'm trying to use a client REST with Android but it happens a
> NullPointerException at the piece of code below (line 4), do you know
> what to do?:
>
> 1 WebResource content = Client.create().resource(getBaseURI());
> 2 ClientResponse clientResponse = null;
> 3 FileInputStream fis = new FileInputStream(file);
> 4 Builder type = content.path("/backup/save/nomearquivo?l=" +
> length).type(
> 5 javax.ws.rs.core.MediaType.TEXT_HTML_TYPE );
> 6 clientResponse = type.put(ClientResponse.class,fis);
>
>
>
>
>
> Thanks,
> Airton Pereira
> http://airtonpereira.webnode.com.br/
>