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

#ifndef __javax_crypto_CipherInputStream__
#define __javax_crypto_CipherInputStream__

#pragma interface

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

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

class javax::crypto::CipherInputStream : public ::java::io::FilterInputStream
{
public:
  CipherInputStream (::java::io::InputStream *, ::javax::crypto::Cipher *);
public:  // actually protected
  CipherInputStream (::java::io::InputStream *);
public:
  virtual jint available ();
  virtual void close ();
  virtual jint read ();
  virtual jint read (jbyteArray, jint, jint);
  virtual jint read (jbyteArray);
  virtual jlong skip (jlong);
  virtual jboolean markSupported ();
  virtual void mark (jint) { }
  virtual void reset ();
private:
  void nextBlock ();
  ::javax::crypto::Cipher * __attribute__((aligned(__alignof__( ::java::io::FilterInputStream )))) cipher;
  jbyteArray outBuffer;
  jint outOffset;
  jint outLength;
  JArray<jbyteArray> * inBuffer;
  jint inLength;
  jboolean isStream;
  static const jint VIRGIN = 0L;
  static const jint LIVING = 1L;
  static const jint DYING = 2L;
  static const jint DEAD = 3L;
  jint state;
public:

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

#endif /* __javax_crypto_CipherInputStream__ */
