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

#ifndef __javax_crypto_CipherOutputStream__
#define __javax_crypto_CipherOutputStream__

#pragma interface

#include <java/io/FilterOutputStream.h>
#include <gcj/array.h>

extern "Java"
{
  namespace javax
  {
    namespace crypto
    {
      class CipherOutputStream;
      class Cipher;
    }
  }
}

class javax::crypto::CipherOutputStream : public ::java::io::FilterOutputStream
{
public:
  CipherOutputStream (::java::io::OutputStream *, ::javax::crypto::Cipher *);
public:  // actually protected
  CipherOutputStream (::java::io::OutputStream *);
public:
  virtual void close ();
  virtual void flush ();
  virtual void write (jint);
  virtual void write (jbyteArray);
  virtual void write (jbyteArray, jint, jint);
private:
  void process ();
  ::javax::crypto::Cipher * __attribute__((aligned(__alignof__( ::java::io::FilterOutputStream )))) cipher;
  JArray<jbyteArray> * inBuffer;
  jint inLength;
  jbyteArray outBuffer;
  static const jint FIRST_TIME = 0L;
  static const jint SECOND_TIME = 1L;
  static const jint SEASONED = 2L;
  jint state;
  jboolean isStream;
public:

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

#endif /* __javax_crypto_CipherOutputStream__ */
