Downloader.java 2.06 KB
package com.squareup.picasso;

import android.graphics.Bitmap;
import android.net.Uri;
import java.io.IOException;
import java.io.InputStream;

public abstract interface Downloader
{
  public abstract Response load(Uri paramUri, int paramInt)
    throws IOException;
  
  public abstract void shutdown();
  
  public static class Response
  {
    final InputStream a;
    final Bitmap b;
    public final boolean c;
    final long d;
    
    @Deprecated
    public Response(Bitmap paramBitmap, boolean paramBoolean)
    {
      if (paramBitmap == null) {
        throw new IllegalArgumentException("Bitmap may not be null.");
      }
      this.a = null;
      this.b = paramBitmap;
      this.c = paramBoolean;
      this.d = -1L;
    }
    
    @Deprecated
    public Response(Bitmap paramBitmap, boolean paramBoolean, long paramLong)
    {
      this(paramBitmap, paramBoolean);
    }
    
    @Deprecated
    public Response(InputStream paramInputStream, boolean paramBoolean)
    {
      this(paramInputStream, paramBoolean, -1L);
    }
    
    public Response(InputStream paramInputStream, boolean paramBoolean, long paramLong)
    {
      if (paramInputStream == null) {
        throw new IllegalArgumentException("Stream may not be null.");
      }
      this.a = paramInputStream;
      this.b = null;
      this.c = paramBoolean;
      this.d = paramLong;
    }
    
    @Deprecated
    public Bitmap getBitmap()
    {
      return this.b;
    }
    
    public long getContentLength()
    {
      return this.d;
    }
    
    public InputStream getInputStream()
    {
      return this.a;
    }
  }
  
  public static class ResponseException
    extends IOException
  {
    public final boolean a;
    public final int b;
    
    public ResponseException(String paramString, int paramInt1, int paramInt2)
    {
      super();
      this.a = NetworkPolicy.isOfflineOnly(paramInt1);
      this.b = paramInt2;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/squareup/picasso/Downloader.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */