7 #include "structdefs.h"
10 #include "methodheaders.h"
12 #ifdef D___FileOutputStream______nativeWrite____I__AR_B_I_I
13 void CALL34(___FileOutputStream______nativeWrite____I__AR_B_I_I, int fd, int off, int len, int fd, struct ArrayObject * ___array___, int off, int len) {
16 char * string= (((char *)&VAR(___array___)->___length___)+sizeof(int));
17 int status=write(fd, &string[off], len);
22 #ifdef D___FileOutputStream______nativeClose____I
23 void CALL11(___FileOutputStream______nativeClose____I, int fd, int fd) {
31 #ifdef D___FileOutputStream______nativeFlush____I
32 void CALL11(___FileOutputStream______nativeFlush____I, int fd, int fd) {
33 // not supported in RAW version
41 #ifdef D___FileOutputStream______nativeOpen_____AR_B
42 int CALL01(___FileOutputStream______nativeOpen_____AR_B, struct ArrayObject * ___filename___) {
46 int length=VAR(___filename___)->___length___;
47 char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int));
48 int fd=open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU);
54 #ifdef D___FileOutputStream______nativeAppend_____AR_B
55 int CALL01(___FileOutputStream______nativeAppend_____AR_B, struct ArrayObject * ___filename___) {
59 int length=VAR(___filename___)->___length___;
60 char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int));
61 int fd=open(filename, O_WRONLY|O_CREAT|O_APPEND, S_IRWXU);
67 #ifdef D___FileInputStream______nativeOpen_____AR_B
68 int CALL01(___FileInputStream______nativeOpen_____AR_B, struct ArrayObject * ___filename___) {
72 int length=VAR(___filename___)->___length___;
73 char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int));
74 int fd=open(filename, O_RDONLY, 0);
80 #ifdef D___FileInputStream______nativeClose____I
81 void CALL11(___FileInputStream______nativeClose____I, int fd, int fd) {
89 #ifdef D___FileInputStream______nativeRead____I__AR_B_I
90 int CALL23(___FileInputStream______nativeRead____I__AR_B_I, int fd, int numBytes, int fd, struct ArrayObject * ___array___, int numBytes) {
94 int toread=VAR(___array___)->___length___;
95 char* string= (((char *)&VAR(___array___)->___length___)+sizeof(int));
101 status=read(fd, string, toread);
107 #ifdef D___FileInputStream______nativePeek____I
108 int CALL11(___FileInputStream______nativePeek____I, int fd, int fd) {
114 status=read(fd, string, 1);
119 lseek(fd, -1, SEEK_CUR);
125 #ifdef D___File______nativeLength_____AR_B
126 long long CALL01(___File______nativeLength_____AR_B, struct ArrayObject * ___pathname___) {
130 int length=VAR(___pathname___)->___length___;
131 char* filename= (((char *)&VAR(___pathname___)->___length___)+sizeof(int));