package com.thoughtworks.xstream.io;

import com.thoughtworks.xstream.io.naming.NameCoder;
import com.thoughtworks.xstream.io.naming.NoNameCoder;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

public abstract class AbstractDriver
  implements HierarchicalStreamDriver
{
  private NameCoder replacer;

  public AbstractDriver()
  {
    this(new NoNameCoder());
  }

  public AbstractDriver(NameCoder paramNameCoder)
  {
    this.replacer = paramNameCoder;
  }

  public HierarchicalStreamReader createReader(File paramFile)
  {
    try
    {
      HierarchicalStreamReader localHierarchicalStreamReader = createReader(new FileInputStream(paramFile));
      return localHierarchicalStreamReader;
    }
    catch (FileNotFoundException localFileNotFoundException)
    {
      throw new StreamException(localFileNotFoundException);
    }
  }

  public HierarchicalStreamReader createReader(URL paramURL)
  {
    InputStream localInputStream;
    try
    {
      localInputStream = paramURL.openStream();
    }
    catch (IOException localIOException)
    {
      throw new StreamException(localIOException);
    }
    return createReader(localInputStream);
  }

  public NameCoder getNameCoder()
  {
    return this.replacer;
  }
}

/* Location:           /Users/vikas/Documents/Mhacks_Real_app/classes-dex2jar.jar
 * Qualified Name:     com.thoughtworks.xstream.io.AbstractDriver
 * JD-Core Version:    0.6.2
 */