summaryrefslogtreecommitdiff
path: root/libjava/gnu/java/nio/channels/FileChannelImpl.h
blob: 34099c52ffb8aec3cfe9fb82977e783cd868e2c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_java_nio_channels_FileChannelImpl__
#define __gnu_java_nio_channels_FileChannelImpl__

#pragma interface

#include <java/nio/channels/FileChannel.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace java
    {
      namespace nio
      {
        namespace channels
        {
            class FileChannelImpl;
        }
      }
    }
  }
  namespace java
  {
    namespace nio
    {
        class ByteBuffer;
        class MappedByteBuffer;
      namespace channels
      {
          class FileChannel;
          class FileChannel$MapMode;
          class FileLock;
          class ReadableByteChannel;
          class WritableByteChannel;
      }
    }
  }
}

class gnu::java::nio::channels::FileChannelImpl : public ::java::nio::channels::FileChannel
{

  static void init();
public:
  FileChannelImpl();
  static ::gnu::java::nio::channels::FileChannelImpl * create(::java::io::File *, jint);
private:
  FileChannelImpl(::java::io::File *, jint);
public: // actually package-private
  FileChannelImpl(jint, jint);
private:
  jint open(::java::lang::String *, jint);
public:
  jint available();
private:
  jlong implPosition();
  void seek(jlong);
  void implTruncate(jlong);
public:
  void unlock(jlong, jlong);
  jlong size();
public: // actually protected
  void implCloseChannel();
  void finalize();
public:
  jint read(::java::nio::ByteBuffer *);
  jint read(::java::nio::ByteBuffer *, jlong);
  jint read();
  jint read(JArray< jbyte > *, jint, jint);
  jlong read(JArray< ::java::nio::ByteBuffer * > *, jint, jint);
  jint write(::java::nio::ByteBuffer *);
  jint write(::java::nio::ByteBuffer *, jlong);
  void write(JArray< jbyte > *, jint, jint);
  void write(jint);
  jlong write(JArray< ::java::nio::ByteBuffer * > *, jint, jint);
  ::java::nio::MappedByteBuffer * mapImpl(jchar, jlong, jint);
  ::java::nio::MappedByteBuffer * map(::java::nio::channels::FileChannel$MapMode *, jlong, jlong);
  void force(jboolean);
private:
  jint smallTransferTo(jlong, jint, ::java::nio::channels::WritableByteChannel *);
public:
  jlong transferTo(jlong, jlong, ::java::nio::channels::WritableByteChannel *);
private:
  jint smallTransferFrom(::java::nio::channels::ReadableByteChannel *, jlong, jint);
public:
  jlong transferFrom(::java::nio::channels::ReadableByteChannel *, jlong, jlong);
  ::java::nio::channels::FileLock * tryLock(jlong, jlong, jboolean);
private:
  jboolean lock(jlong, jlong, jboolean, jboolean);
public:
  ::java::nio::channels::FileLock * lock(jlong, jlong, jboolean);
  jlong position();
  ::java::nio::channels::FileChannel * position(jlong);
  ::java::nio::channels::FileChannel * truncate(jlong);
  jint getNativeFD();
  static const jint READ = 1;
  static const jint WRITE = 2;
  static const jint APPEND = 4;
  static const jint EXCL = 8;
  static const jint SYNC = 16;
  static const jint DSYNC = 32;
private:
  jint __attribute__((aligned(__alignof__( ::java::nio::channels::FileChannel)))) fd;
  jlong pos;
  jint mode;
public:
  static ::gnu::java::nio::channels::FileChannelImpl * in;
  static ::gnu::java::nio::channels::FileChannelImpl * out;
  static ::gnu::java::nio::channels::FileChannelImpl * err;
  static ::java::lang::Class class$;
};

#endif // __gnu_java_nio_channels_FileChannelImpl__