// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __org_apache_lucene_index_FieldsWriter__
#define __org_apache_lucene_index_FieldsWriter__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace document
        {
          class Document;
        }
        namespace store
        {
          class Directory;
          class IndexOutput;
        }
        namespace index
        {
          class FieldsWriter;
          class FieldInfos;
        }
      }
    }
  }
}

class org::apache::lucene::index::FieldsWriter : public ::java::lang::Object
{
public: // actually package-private
  FieldsWriter (::org::apache::lucene::store::Directory *, ::java::lang::String *, ::org::apache::lucene::index::FieldInfos *);
  void close ();
  void addDocument (::org::apache::lucene::document::Document *);
private:
  jbyteArray compress (jbyteArray);
public: // actually package-private
  static const jint FIELD_IS_TOKENIZED = 1L;
  static const jint FIELD_IS_BINARY = 2L;
  static const jint FIELD_IS_COMPRESSED = 4L;
private:
  ::org::apache::lucene::index::FieldInfos * __attribute__((aligned(__alignof__( ::java::lang::Object )))) fieldInfos;
  ::org::apache::lucene::store::IndexOutput *fieldsStream;
  ::org::apache::lucene::store::IndexOutput *indexStream;

  friend class org_apache_lucene_index_FieldsReader$FieldForMerge;
public:

  static ::java::lang::Class class$;
};

#endif /* __org_apache_lucene_index_FieldsWriter__ */
