package com.jaredrummler.android.processes.models;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;

public final class Cgroup
  extends ProcFile
{
  public static final Parcelable.Creator<Cgroup> CREATOR = new Parcelable.Creator()
  {
    public Cgroup createFromParcel(Parcel paramAnonymousParcel)
    {
      return new Cgroup(paramAnonymousParcel, null);
    }
    
    public Cgroup[] newArray(int paramAnonymousInt)
    {
      return new Cgroup[paramAnonymousInt];
    }
  };
  public final ArrayList<ControlGroup> groups;
  
  private Cgroup(Parcel paramParcel)
  {
    super(paramParcel);
    this.groups = paramParcel.createTypedArrayList(ControlGroup.CREATOR);
  }
  
  private Cgroup(String paramString)
    throws IOException
  {
    super(paramString);
    paramString = this.content.split("\n");
    this.groups = new ArrayList();
    int j = paramString.length;
    int i = 0;
    for (;;)
    {
      String str;
      if (i < j) {
        str = paramString[i];
      }
      try
      {
        this.groups.add(new ControlGroup(str));
        i += 1;
        continue;
        return;
      }
      catch (Exception localException)
      {
        for (;;) {}
      }
    }
  }
  
  public static Cgroup get(int paramInt)
    throws IOException
  {
    return new Cgroup(String.format("/proc/%d/cgroup", new Object[] { Integer.valueOf(paramInt) }));
  }
  
  public ControlGroup getGroup(String paramString)
  {
    Iterator localIterator = this.groups.iterator();
    while (localIterator.hasNext())
    {
      ControlGroup localControlGroup = (ControlGroup)localIterator.next();
      String[] arrayOfString = localControlGroup.subsystems.split(",");
      int j = arrayOfString.length;
      int i = 0;
      while (i < j)
      {
        if (arrayOfString[i].equals(paramString)) {
          return localControlGroup;
        }
        i += 1;
      }
    }
    return null;
  }
  
  public void writeToParcel(Parcel paramParcel, int paramInt)
  {
    super.writeToParcel(paramParcel, paramInt);
    paramParcel.writeTypedList(this.groups);
  }
}


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