package com.jaredrummler.android.processes.models;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import java.io.IOException;

public final class Status
  extends ProcFile
{
  public static final Parcelable.Creator<Status> CREATOR = new Parcelable.Creator()
  {
    public Status createFromParcel(Parcel paramAnonymousParcel)
    {
      return new Status(paramAnonymousParcel, null);
    }
    
    public Status[] newArray(int paramAnonymousInt)
    {
      return new Status[paramAnonymousInt];
    }
  };
  
  private Status(Parcel paramParcel)
  {
    super(paramParcel);
  }
  
  private Status(String paramString)
    throws IOException
  {
    super(paramString);
  }
  
  public static Status get(int paramInt)
    throws IOException
  {
    return new Status(String.format("/proc/%d/status", new Object[] { Integer.valueOf(paramInt) }));
  }
  
  public int getGid()
  {
    try
    {
      int i = Integer.parseInt(getValue("Gid").split("\\s+")[0]);
      return i;
    }
    catch (Exception localException) {}
    return -1;
  }
  
  public int getUid()
  {
    try
    {
      int i = Integer.parseInt(getValue("Uid").split("\\s+")[0]);
      return i;
    }
    catch (Exception localException) {}
    return -1;
  }
  
  public String getValue(String paramString)
  {
    String[] arrayOfString = this.content.split("\n");
    int j = arrayOfString.length;
    int i = 0;
    while (i < j)
    {
      String str = arrayOfString[i];
      if (str.startsWith(paramString + ":")) {
        return str.split(paramString + ":")[1].trim();
      }
      i += 1;
    }
    return null;
  }
}


/* Location:              /home/enzo/Documents/hacking/malwares/viking-horde/classes.jar!/com/jaredrummler/android/processes/models/Status.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */