L'utilisation de rénovation pour télécharger le fichier d'image

- Je utiliser Rénovation 1.6.0 sur mon projet Android,

l'url de la requête:

https://example.com/image/thumbs/filename/sample.png

Mon interface comme ceci:

public interface ImageService {
    @GET("/image/thumbs/filename/{filename}")
    @Streaming
    void getThumbs(
        @Path("filename") String filename,
        Callback<Response> callback
    );
}

D'une requête HTTP, le succès, mais il y a certaines erreurs se produisent

D/Retrofit(27613): ---> HTTP GET https://example.com/image/thumbs/filename/sample.png
D/Retrofit(27613): ---> END HTTP (no body)
D/Retrofit(27613): <--- HTTP 200 https://example.com/image/thumbs/filename/sample.png (451ms)
D/Retrofit(27613): : HTTP/1.1 200 OK
D/Retrofit(27613): Connection: Keep-Alive
D/Retrofit(27613): Content-Disposition: inline; filename="sample.png"
D/Retrofit(27613): Content-Type: image/png; charset=binary
D/Retrofit(27613): Date: Wed, 11 Jun 2014 06:02:31 GMT
D/Retrofit(27613): Keep-Alive: timeout=5, max=100
D/Retrofit(27613): OkHttp-Received-Millis: 1402466577134
D/Retrofit(27613): OkHttp-Response-Source: NETWORK 200
D/Retrofit(27613): OkHttp-Sent-Millis: 1402466577027
D/Retrofit(27613): Server: Apache/2.2.22 (Ubuntu)
D/Retrofit(27613): Transfer-Encoding: chunked
D/Retrofit(27613): X-Powered-By: PHP/5.4.28-1+deb.sury.org~precise+1
D/Retrofit(27613): ---- ERROR https://example.com/image/thumbs/filename/sample.png
D/Retrofit(27613): java.io.UnsupportedEncodingException: binary
D/Retrofit(27613):      at java.nio.charset.Charset.forNameUEE(Charset.java:322)
D/Retrofit(27613):      at java.lang.String.<init>(String.java:228)
D/Retrofit(27613):      at retrofit.RestAdapter.logAndReplaceResponse(RestAdapter.java:478)
D/Retrofit(27613):      at retrofit.RestAdapter.access$500(RestAdapter.java:109)
D/Retrofit(27613):      at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:333)
D/Retrofit(27613):      at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
D/Retrofit(27613):      at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
D/Retrofit(27613):      at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
D/Retrofit(27613):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
D/Retrofit(27613):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
D/Retrofit(27613):      at retrofit.Platform$Android$2$1.run(Platform.java:142)
D/Retrofit(27613):      at java.lang.Thread.run(Thread.java:841)
D/Retrofit(27613): Caused by: java.nio.charset.UnsupportedCharsetException: binary
D/Retrofit(27613):      at java.nio.charset.Charset.forName(Charset.java:309)
D/Retrofit(27613):      at java.nio.charset.Charset.forNameUEE(Charset.java:320)
D/Retrofit(27613):      ... 11 more
D/Retrofit(27613): ---- END ERROR

Comment puis-je résoudre ce problème?

peut-être carré.github.io/picasso qui est une image de téléchargement de la bibliothèque également faite par square. autre chose que vous devriez regarder dans TypedFile sur la modernisation square.github.io/retrofit/javadoc/index.html
J'ai d'autres Api de l'utilisation de rénovation, si il faut le charger pour afficher mayebe je vais utiliser picasso,merci pour votre suggestion!

OriginalL'auteur Denny Huang | 2014-06-11