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

package org.sbml.libsbml;

public class XMLOwningOutputStringStream {
   private long swigCPtr;
   protected boolean swigCMemOwn;

   protected XMLOwningOutputStringStream(long cPtr, boolean cMemoryOwn)
   {
     swigCMemOwn = cMemoryOwn;
     swigCPtr    = cPtr;
   }

   protected static long getCPtr(XMLOwningOutputStringStream obj)
   {
     return (obj == null) ? 0 : obj.swigCPtr;
   }

   protected static long getCPtrAndDisown (XMLOwningOutputStringStream obj)
   {
     long ptr = 0;

     if (obj != null)
     {
       ptr             = obj.swigCPtr;
       obj.swigCMemOwn = false;
     }

     return ptr;
   }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        libsbmlJNI.delete_XMLOwningOutputStringStream(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  
/** * @internal */ public
 XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl, String programName, String programVersion) {
    this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_0(encoding, writeXMLDecl, programName, programVersion), true);
  }

  
/** * @internal */ public
 XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl, String programName) {
    this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_1(encoding, writeXMLDecl, programName), true);
  }

  
/** * @internal */ public
 XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl) {
    this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_2(encoding, writeXMLDecl), true);
  }

  
/** * @internal */ public
 XMLOwningOutputStringStream(String encoding) {
    this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_3(encoding), true);
  }

  
/** * @internal */ public
 XMLOwningOutputStringStream() {
    this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_4(), true);
  }

}
