/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="pathname">Pathname of file to process.</param>
		public FastXmlElementSplitter(string pathname)
		{
			if (string.IsNullOrEmpty(pathname)) throw new ArgumentException("Null or empty string", "pathname");

			if (!File.Exists(pathname)) throw new FileNotFoundException("File was not found.", "pathname");

			_input = new AsyncFileReader(pathname);
		}
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="bytes">Content of XML to be split - could be extracted bytes from splitting a file</param>
        public FastXmlElementSplitter(byte[] bytes)
        {
            if (bytes == null || bytes.Length == 0)
            {
                throw new ArgumentException("Null or empty byte array", "bytes");
            }

            _input = new ByteArrayReader(bytes);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="pathname">Pathname of file to process.</param>
        public FastXmlElementSplitter(string pathname)
        {
            if (string.IsNullOrEmpty(pathname))
            {
                throw new ArgumentException("Null or empty string", "pathname");
            }

            if (!File.Exists(pathname))
            {
                throw new FileNotFoundException("File was not found.", "pathname");
            }

            _input = new AsyncFileReader(pathname);
        }
        private void Dispose(bool disposing)
        {
            if (IsDisposed)
            {
                return;                 // Done already, so nothing left to do.
            }
            if (disposing)
            {
                if (_input != null)
                {
                    _input.Close();
                }
                _input = null;
            }

            // Dispose unmanaged resources here, whether disposing is true or false.

            // Main data members.

            IsDisposed = true;
        }
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="bytes">Content of XML to be split - could be extracted bytes from splitting a file</param>
		public FastXmlElementSplitter(byte[] bytes)
		{
			if (bytes == null || bytes.Length == 0) throw new ArgumentException("Null or empty byte array", "bytes");

			_input = new ByteArrayReader(bytes);
		}
		private void Dispose(bool disposing)
		{
			if (IsDisposed)
				return; // Done already, so nothing left to do.

			if (disposing)
			{
				if (_input != null)
					_input.Close();
				_input = null;
			}

			// Dispose unmanaged resources here, whether disposing is true or false.

			// Main data members.

			IsDisposed = true;
		}