/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.25
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace clucene.net {

using System;
using System.Runtime.InteropServices;

public class FileReader : Reader {
  private HandleRef swigCPtr;

  internal FileReader(IntPtr cPtr, bool cMemoryOwn) : base(libCLcsharpPINVOKE.FileReaderUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(FileReader obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~FileReader() {
    Dispose();
  }

  public override void Dispose() {
    if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
      swigCMemOwn = false;
      libCLcsharpPINVOKE.delete_FileReader(swigCPtr);
    }
    swigCPtr = new HandleRef(null, IntPtr.Zero);
    GC.SuppressFinalize(this);
    base.Dispose();
  }

  public FileReader(string fname, string encoding_scheme, int cachelen, int cachebuff) : this(libCLcsharpPINVOKE.new_FileReader__SWIG_0(fname, encoding_scheme, cachelen, cachebuff), true) {
    if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
  }

  public FileReader(string fname, string encoding_scheme, int cachelen) : this(libCLcsharpPINVOKE.new_FileReader__SWIG_1(fname, encoding_scheme, cachelen), true) {
    if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
  }

  public FileReader(string fname, string encoding_scheme) : this(libCLcsharpPINVOKE.new_FileReader__SWIG_2(fname, encoding_scheme), true) {
    if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
  }

  public FileReader(string fname) : this(libCLcsharpPINVOKE.new_FileReader__SWIG_3(fname), true) {
    if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
  }

}

}
