7 #include "structdefs.h"
11 void CALL34(___FileOutputStream______nativeWrite____I__AR_B_I_I, int fd, int off, int len, int fd, struct ArrayObject * ___array___, int off, int len) {
14 char * string= (((char *)&VAR(___array___)->___length___)+sizeof(int));
15 int status=write(fd, &string[off], len);
19 void CALL11(___FileOutputStream______nativeClose____I, int fd, int fd) {
26 void CALL11(___FileOutputStream______nativeFlush____I, int fd, int fd) {
27 // not supported in RAW version
34 int CALL01(___FileOutputStream______nativeOpen_____AR_B, struct ArrayObject * ___filename___) {
38 int length=VAR(___filename___)->___length___;
39 char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int));
40 int fd=open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU);
45 int CALL01(___FileOutputStream______nativeAppend_____AR_B, struct ArrayObject * ___filename___) {
49 int length=VAR(___filename___)->___length___;
50 char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int));
51 int fd=open(filename, O_WRONLY|O_CREAT|O_APPEND, S_IRWXU);
56 int CALL01(___FileInputStream______nativeOpen_____AR_B, struct ArrayObject * ___filename___) {
60 int length=VAR(___filename___)->___length___;
61 char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int));
62 int fd=open(filename, O_RDONLY, 0);
67 void CALL11(___FileInputStream______nativeClose____I, int fd, int fd) {
74 int CALL23(___FileInputStream______nativeRead____I__AR_B_I, int fd, int numBytes, int fd, struct ArrayObject * ___array___, int numBytes) {
78 int toread=VAR(___array___)->___length___;
79 char* string= (((char *)&VAR(___array___)->___length___)+sizeof(int));
85 status=read(fd, string, toread);
90 int CALL11(___FileInputStream______nativePeek____I, int fd, int fd) {
96 status=read(fd, string, 1);
101 lseek(fd, -1, SEEK_CUR);
106 long long CALL01(___File______nativeLength_____AR_B, struct ArrayObject * ___pathname___) {
110 int length=VAR(___pathname___)->___length___;
111 char* filename= (((char *)&VAR(___pathname___)->___length___)+sizeof(int));