ic.java 1.86 KB
import com.google.android.gms.internal.zzbji;
import com.google.android.gms.internal.zzbjk;
import com.google.android.gms.tagmanager.zzbo;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

public final class ic
  implements zzbji
{
  private HttpURLConnection a;
  private InputStream b = null;
  
  public final void close()
  {
    HttpURLConnection localHttpURLConnection = this.a;
    try
    {
      if (this.b != null) {
        this.b.close();
      }
      if (localHttpURLConnection != null) {
        localHttpURLConnection.disconnect();
      }
      return;
    }
    catch (IOException localIOException)
    {
      str = String.valueOf(localIOException.getMessage());
      if (str.length() == 0) {}
    }
    for (String str = "HttpUrlConnectionNetworkClient: Error when closing http input stream: ".concat(str);; str = new String("HttpUrlConnectionNetworkClient: Error when closing http input stream: "))
    {
      zzbo.zzb(str, localIOException);
      break;
    }
  }
  
  public final InputStream zzhX(String paramString)
    throws IOException
  {
    paramString = (HttpURLConnection)new URL(paramString).openConnection();
    paramString.setReadTimeout(20000);
    paramString.setConnectTimeout(20000);
    this.a = paramString;
    paramString = this.a;
    int i = paramString.getResponseCode();
    if (i == 200)
    {
      this.b = paramString.getInputStream();
      return this.b;
    }
    paramString = 25 + "Bad response: " + i;
    if (i == 404) {
      throw new FileNotFoundException(paramString);
    }
    if (i == 503) {
      throw new zzbjk(paramString);
    }
    throw new IOException(paramString);
  }
}


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