Showing the changes to java/pkg2/java/io (88 of 18352 files). Show all
Unified · Split
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
| @@ -0,0 +1,72 @@ | ||
| 1 | +implement FileDescriptor_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + FALSE : import jni; | |
| 28 | + TRUE : import jni; | |
| 29 | +#<< | |
| 30 | + | |
| 31 | +include "FileDescriptor_L.m"; | |
| 32 | + | |
| 33 | +#>> extra post includes here | |
| 34 | +#<< | |
| 35 | + | |
| 36 | +init( jni_p : JNI ) | |
| 37 | +{ | |
| 38 | + # save java native inteface mod instance | |
| 39 | + jni = jni_p; | |
| 40 | + #>>extra initialization here | |
| 41 | + sys = jni->sys; | |
| 42 | + #<< | |
| 43 | +} | |
| 44 | + | |
| 45 | +valid_Z( this : ref FileDescriptor_obj) : int | |
| 46 | +{#>> | |
| 47 | + if (this.fd != nil) | |
| 48 | + return TRUE; | |
| 49 | + else | |
| 50 | + return FALSE; | |
| 51 | +}#<< | |
| 52 | + | |
| 53 | +sync_V( this : ref FileDescriptor_obj) | |
| 54 | +{#>> | |
| 55 | + # this routine has no meaning in the limbo world because there is | |
| 56 | + # nothing to sync or flush. It may have meaning to each underlying | |
| 57 | + # file system (device driver) but at the present there is no devtab | |
| 58 | + # interface to the device driver for sync. As such, this routine is | |
| 59 | + # a noop. | |
| 60 | + jni->ThrowException("java.io.SyncFailedException", "sync not gauranteed"); | |
| 61 | +}#<< | |
| 62 | + | |
| 63 | +initSystemFD_rFileDescriptor_I_rFileDescriptor( p0 : ref FileDescriptor_obj,p1 : int) : ref FileDescriptor_obj | |
| 64 | +{#>> | |
| 65 | + p0.fd = sys->fildes(p1); | |
| 66 | + return (p0); | |
| 67 | +}#<< | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| @@ -0,0 +1,16 @@ | ||
| 1 | +# javal v1.3 generated file: edit with care | |
| 2 | + | |
| 3 | +FileDescriptor_L : module | |
| 4 | +{ | |
| 5 | + FileDescriptor_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + fd : ref Sys->FD; | |
| 9 | + }; | |
| 10 | + | |
| 11 | + init : fn( jni_p : JNI ); | |
| 12 | + valid_Z : fn( this : ref FileDescriptor_obj) : int; | |
| 13 | + sync_V : fn( this : ref FileDescriptor_obj); | |
| 14 | + initSystemFD_rFileDescriptor_I_rFileDescriptor : fn( p0 : ref FileDescriptor_obj,p1 : int) : ref FileDescriptor_obj; | |
| 15 | + | |
| 16 | +}; | |
Empty file added.
| @@ -0,0 +1,135 @@ | ||
| 1 | +implement FileInputStream_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + FALSE : import jni; | |
| 28 | + TRUE : import jni; | |
| 29 | +include "FileDescriptor_L.m"; | |
| 30 | + FileDescriptor_obj : import FileDescriptor_L; | |
| 31 | +#<< | |
| 32 | + | |
| 33 | +include "FileInputStream_L.m"; | |
| 34 | + | |
| 35 | +#>> extra post includes here | |
| 36 | +#<< | |
| 37 | + | |
| 38 | +init( jni_p : JNI ) | |
| 39 | +{ | |
| 40 | + # save java native inteface mod instance | |
| 41 | + jni = jni_p; | |
| 42 | + #>>extra initialization here | |
| 43 | + sys = jni->sys; | |
| 44 | + #<< | |
| 45 | +} | |
| 46 | + | |
| 47 | +open_rString_V( this : ref FileInputStream_obj, p0 : JString) | |
| 48 | +{#>> | |
| 49 | + # p0 == file name | |
| 50 | + | |
| 51 | + if ((p0 == nil) || (p0.str == nil)) | |
| 52 | + jni->ThrowException("java.lang.NullPointerException", "str is nil"); | |
| 53 | + | |
| 54 | + this.fd.fd = sys->open(p0.str, sys->OREAD); | |
| 55 | + if(this.fd.fd == nil) | |
| 56 | + jni->ThrowException("java.io.IOException", "open error"); | |
| 57 | +}#<< | |
| 58 | + | |
| 59 | +read_I( this : ref FileInputStream_obj) : int | |
| 60 | +{#>> | |
| 61 | + buf := array[1] of byte; | |
| 62 | + | |
| 63 | + if (this.fd.fd == nil) | |
| 64 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 65 | + readin := sys->read(this.fd.fd, buf, 1); | |
| 66 | + if (readin == 0) # EOF | |
| 67 | + return -1; | |
| 68 | + | |
| 69 | + if (readin < 0) | |
| 70 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 71 | + return (int buf[0]); | |
| 72 | + | |
| 73 | +}#<< | |
| 74 | + | |
| 75 | +readBytes_aB_I_I_I( this : ref FileInputStream_obj, p0 : JArrayB,p1 : int,p2 : int) : int | |
| 76 | +{#>> | |
| 77 | + # p0 == input buffer (array of bytes) | |
| 78 | + # p1 == offset | |
| 79 | + # p2 == length | |
| 80 | + # read p2 bytes from the file and place them at location (p0 + p1) | |
| 81 | + | |
| 82 | + if (this.fd == nil) | |
| 83 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 84 | + if ((p0 == nil) || (p0.ary == nil)) | |
| 85 | + jni->ThrowException("java.lang.NullPointerException", "nil buffer pointer"); | |
| 86 | + if ((p1 < 0) || (p1 > len p0.ary)) | |
| 87 | + jni->ThrowException("java.lang.ArrayIndexOutOfBoundsException", | |
| 88 | + jni->sys->sprint( "offset=%d len buf array=%d", p1, len p0.ary)); | |
| 89 | + | |
| 90 | + if ((p1 + p2) > len p0.ary) | |
| 91 | + p2 = (len p0.ary) - p1; | |
| 92 | + if (p2 <= 0) | |
| 93 | + return 0; | |
| 94 | + | |
| 95 | + n := sys->read(this.fd.fd, p0.ary[p1: len p0.ary], p2); | |
| 96 | + if (n == 0) # EOF | |
| 97 | + return -1; | |
| 98 | + | |
| 99 | + if (n < 0) | |
| 100 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 101 | + return n; | |
| 102 | +}#<< | |
| 103 | + | |
| 104 | +skip_J_J( this : ref FileInputStream_obj, p0 : big) : big | |
| 105 | +{#>> | |
| 106 | + # skip the next p0 bytes from the Input stream. First find out where you are in | |
| 107 | + # the stream. Next skip the bytes then return the "actual" bytes skipped. | |
| 108 | + | |
| 109 | + if (this.fd.fd == nil) | |
| 110 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 111 | + cur := sys->seek(this.fd.fd, 0, sys->SEEKRELA); | |
| 112 | + end := sys->seek(this.fd.fd, (int p0), sys->SEEKRELA); | |
| 113 | + return big (end - cur); | |
| 114 | +}#<< | |
| 115 | + | |
| 116 | +available_I( this : ref FileInputStream_obj) : int | |
| 117 | +{#>> | |
| 118 | + if (this.fd.fd == nil) | |
| 119 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 120 | + cur := sys->seek(this.fd.fd, 0, Sys->SEEKRELA); | |
| 121 | + end := sys->seek(this.fd.fd, 0, Sys->SEEKEND); | |
| 122 | + sys->seek(this.fd.fd, cur, Sys->SEEKSTART); | |
| 123 | + | |
| 124 | + return (end - cur); | |
| 125 | +}#<< | |
| 126 | + | |
| 127 | +close_V( this : ref FileInputStream_obj) | |
| 128 | +{#>> | |
| 129 | + if (this.fd != nil) | |
| 130 | + this.fd.fd = nil; | |
| 131 | +}#<< | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| @@ -0,0 +1,19 @@ | ||
| 1 | +# javal v1.3 generated file: edit with care | |
| 2 | + | |
| 3 | +FileInputStream_L : module | |
| 4 | +{ | |
| 5 | + FileInputStream_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + fd : ref FileDescriptor_obj; | |
| 9 | + }; | |
| 10 | + | |
| 11 | + init : fn( jni_p : JNI ); | |
| 12 | + open_rString_V : fn( this : ref FileInputStream_obj, p0 : JString); | |
| 13 | + read_I : fn( this : ref FileInputStream_obj) : int; | |
| 14 | + readBytes_aB_I_I_I : fn( this : ref FileInputStream_obj, p0 : JArrayB,p1 : int,p2 : int) : int; | |
| 15 | + skip_J_J : fn( this : ref FileInputStream_obj, p0 : big) : big; | |
| 16 | + available_I : fn( this : ref FileInputStream_obj) : int; | |
| 17 | + close_V : fn( this : ref FileInputStream_obj); | |
| 18 | + | |
| 19 | +}; | |
Empty file added.
Empty file added.
| @@ -0,0 +1,116 @@ | ||
| 1 | +implement FileOutputStream_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + FALSE : import jni; | |
| 28 | + TRUE : import jni; | |
| 29 | +include "FileDescriptor_L.m"; | |
| 30 | + FileDescriptor_obj : import FileDescriptor_L; | |
| 31 | +#<< | |
| 32 | + | |
| 33 | +include "FileOutputStream_L.m"; | |
| 34 | + | |
| 35 | +#>> extra post includes here | |
| 36 | +#<< | |
| 37 | + | |
| 38 | +init( jni_p : JNI ) | |
| 39 | +{ | |
| 40 | + # save java native inteface mod instance | |
| 41 | + jni = jni_p; | |
| 42 | + #>>extra initialization here | |
| 43 | + sys = jni->sys; | |
| 44 | + #<< | |
| 45 | +} | |
| 46 | + | |
| 47 | +open_rString_V( this : ref FileOutputStream_obj, p0 : JString) | |
| 48 | +{#>> | |
| 49 | + # open file pointed to by p0. If it does not exists, create it and | |
| 50 | + # and open it with mode of 644. | |
| 51 | + | |
| 52 | + if ((p0 == nil) || (p0.str == nil)) | |
| 53 | + jni->ThrowException("java.lang.NullPointerException", "null file name"); | |
| 54 | + | |
| 55 | + this.fd.fd = sys->create(p0.str, sys->OWRITE, 8r666); | |
| 56 | + if(this.fd.fd == nil) | |
| 57 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 58 | +}#<< | |
| 59 | + | |
| 60 | +openAppend_rString_V( this : ref FileOutputStream_obj, p0 : JString) | |
| 61 | +{#>> | |
| 62 | + if ((p0 == nil) || (p0.str == nil)) | |
| 63 | + jni->ThrowException("java.lang.NullPointerException", "null filename"); | |
| 64 | + | |
| 65 | + this.fd.fd = sys->open(p0.str, sys->OWRITE); | |
| 66 | + if(this.fd.fd == nil) | |
| 67 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 68 | + sys->seek(this.fd.fd, 0, sys->SEEKEND); | |
| 69 | +}#<< | |
| 70 | + | |
| 71 | +write_I_V( this : ref FileOutputStream_obj, p0 : int) | |
| 72 | +{#>> | |
| 73 | + # p0 == character to write | |
| 74 | + c := array[1] of byte; | |
| 75 | + c[0] = byte p0; | |
| 76 | + | |
| 77 | + if ((this.fd == nil) || (this.fd.fd == nil)) | |
| 78 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 79 | + | |
| 80 | + if (sys->write(this.fd.fd, c, 1) != 1) | |
| 81 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 82 | +}#<< | |
| 83 | + | |
| 84 | +writeBytes_aB_I_I_V( this : ref FileOutputStream_obj, p0 : JArrayB,p1 : int,p2 : int) | |
| 85 | +{#>> | |
| 86 | + # p0 == buffer array to write from | |
| 87 | + # p1 == offset in buffer | |
| 88 | + # p2 == length to write out | |
| 89 | + | |
| 90 | + if ((this.fd == nil) || (this.fd.fd == nil)) | |
| 91 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 92 | + if ((p0 == nil) || (p0.ary == nil)) | |
| 93 | + jni->ThrowException("java.lang.NullPointerException", nil); | |
| 94 | + if ((p1 < 0) || (p2 < 0) || (p1 > (len p0.ary))) | |
| 95 | + jni->ThrowException("java.lang.ArrayIndexOutOfBoundsException", nil); | |
| 96 | + | |
| 97 | + n := 0; | |
| 98 | + while (p2 > 0) { | |
| 99 | + # you can also write the following line as..... | |
| 100 | + # n = sys->write(this.fd.fd, p0.ary[p1:], p2); | |
| 101 | + n = sys->write(this.fd.fd, p0.ary[p1:len p0.ary], p2); | |
| 102 | + if (n == -1) { | |
| 103 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 104 | + break; | |
| 105 | + } | |
| 106 | + p1 += n; | |
| 107 | + p2 -= n; | |
| 108 | + } | |
| 109 | +}#<< | |
| 110 | + | |
| 111 | +close_V( this : ref FileOutputStream_obj) | |
| 112 | +{#>> | |
| 113 | + if (this.fd != nil) | |
| 114 | + this.fd.fd = nil; | |
| 115 | +}#<< | |
| 116 | + | |
| @@ -0,0 +1,18 @@ | ||
| 1 | +# javal v1.3 generated file: edit with care | |
| 2 | + | |
| 3 | +FileOutputStream_L : module | |
| 4 | +{ | |
| 5 | + FileOutputStream_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + fd : ref FileDescriptor_obj; | |
| 9 | + }; | |
| 10 | + | |
| 11 | + init : fn( jni_p : JNI ); | |
| 12 | + open_rString_V : fn( this : ref FileOutputStream_obj, p0 : JString); | |
| 13 | + openAppend_rString_V : fn( this : ref FileOutputStream_obj, p0 : JString); | |
| 14 | + write_I_V : fn( this : ref FileOutputStream_obj, p0 : int); | |
| 15 | + writeBytes_aB_I_I_V : fn( this : ref FileOutputStream_obj, p0 : JArrayB,p1 : int,p2 : int); | |
| 16 | + close_V : fn( this : ref FileOutputStream_obj); | |
| 17 | + | |
| 18 | +}; | |
Empty file added.
Empty file added.
| @@ -0,0 +1,332 @@ | ||
| 1 | +implement File_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + str : import jni; | |
| 28 | + FALSE : import jni; | |
| 29 | + TRUE : import jni; | |
| 30 | +#<< | |
| 31 | + | |
| 32 | +include "File_L.m"; | |
| 33 | + | |
| 34 | +#>> extra post includes here | |
| 35 | +include "workdir.m"; | |
| 36 | +include "regex.m"; | |
| 37 | +str_mod : String; | |
| 38 | +#<< | |
| 39 | + | |
| 40 | +init( jni_p : JNI ) | |
| 41 | +{ | |
| 42 | + # save java native inteface mod instance | |
| 43 | + jni = jni_p; | |
| 44 | + #>>extra initialization here | |
| 45 | + sys = jni->sys; | |
| 46 | + str_mod = jni->str; | |
| 47 | + #<< | |
| 48 | +} | |
| 49 | + | |
| 50 | +exists0_Z( this : ref File_obj) : int | |
| 51 | +{#>> | |
| 52 | + (ok, nil) := sys->stat(this.path.str); | |
| 53 | + if (ok == -1) | |
| 54 | + return (FALSE); | |
| 55 | + return (TRUE); | |
| 56 | +}#<< | |
| 57 | + | |
| 58 | +canWrite0_Z( this : ref File_obj) : int | |
| 59 | +{#>> | |
| 60 | + # this routine is real cludgy...try to open the file for writing | |
| 61 | + # to see if you have WRITE access rights or not. | |
| 62 | + | |
| 63 | + local_fd := sys->open(this.path.str, sys->OWRITE); | |
| 64 | + if (local_fd == nil) | |
| 65 | + return (FALSE); | |
| 66 | + return (TRUE); | |
| 67 | +}#<< | |
| 68 | + | |
| 69 | +canRead0_Z( this : ref File_obj) : int | |
| 70 | +{#>> | |
| 71 | + # this routine is real cludgy...try to open the file for reading | |
| 72 | + # to see if you have READ access rights or not. | |
| 73 | + | |
| 74 | + local_fd := sys->open(this.path.str, sys->OREAD); | |
| 75 | + if (local_fd == nil) | |
| 76 | + return (FALSE); | |
| 77 | + return (TRUE); | |
| 78 | +}#<< | |
| 79 | + | |
| 80 | +isFile0_Z( this : ref File_obj) : int | |
| 81 | +{#>> | |
| 82 | + (ok, dir) := sys->stat(this.path.str); | |
| 83 | + if(ok >= 0 && !(dir.mode & Sys->CHDIR)) | |
| 84 | + return (TRUE); | |
| 85 | + return (FALSE); | |
| 86 | +}#<< | |
| 87 | + | |
| 88 | +isDirectory0_Z( this : ref File_obj) : int | |
| 89 | +{#>> | |
| 90 | + (ok, dir) := sys->stat(this.path.str); | |
| 91 | + if(ok >= 0 && (dir.mode & Sys->CHDIR)) | |
| 92 | + return (TRUE); | |
| 93 | + return (FALSE); | |
| 94 | +}#<< | |
| 95 | + | |
| 96 | +lastModified0_J( this : ref File_obj) : big | |
| 97 | +{#>> | |
| 98 | + (ok, dir) := sys->stat(this.path.str); | |
| 99 | + if(ok >= 0) | |
| 100 | + return (big dir.mtime); | |
| 101 | + return (big 0); | |
| 102 | +}#<< | |
| 103 | + | |
| 104 | +length0_J( this : ref File_obj) : big | |
| 105 | +{#>> | |
| 106 | + (ok, dir) := sys->stat(this.path.str); | |
| 107 | + if(ok >= 0) | |
| 108 | + return (big dir.length); | |
| 109 | + return (big 0); | |
| 110 | +}#<< | |
| 111 | + | |
| 112 | +mkdir0_Z( this : ref File_obj) : int | |
| 113 | +{#>> | |
| 114 | + (ok, nil) := sys->stat(this.path.str); | |
| 115 | + if(ok >= 0) | |
| 116 | + return (FALSE); | |
| 117 | + fd := sys->create(this.path.str, sys->OREAD, sys->CHDIR + 8r777); | |
| 118 | + if(fd == nil) | |
| 119 | + return (FALSE); | |
| 120 | + fd = nil; | |
| 121 | + return (TRUE); | |
| 122 | +}#<< | |
| 123 | + | |
| 124 | +renameTo0_rFile_Z( this : ref File_obj, p0 : ref File_obj) : int | |
| 125 | +{#>> | |
| 126 | + # this routine is based on the appl/cmd/mv command in inferno.... | |
| 127 | + | |
| 128 | + #put from and to file names into complete path names | |
| 129 | + frompath := pathname(this.path.str); | |
| 130 | + topath := pathname(p0.path.str); | |
| 131 | + | |
| 132 | + #seperate the name of the file from the directory the files reside in | |
| 133 | + (fromdir, fromname) := split(frompath); | |
| 134 | + (todir, toname) := split(topath); | |
| 135 | + | |
| 136 | + (i, dirf) := sys->stat(this.path.str); | |
| 137 | + if ( i == -1 ) | |
| 138 | + return FALSE; | |
| 139 | + | |
| 140 | + # are the files in the same directory???? | |
| 141 | + if ( samefile(fromdir, todir) ) { | |
| 142 | + if ( toname == fromname ) | |
| 143 | + return TRUE; | |
| 144 | + (j, dirt) := sys->stat(p0.path.str); | |
| 145 | + if ( j == 0 ) { | |
| 146 | + if ( (dirf.mode | dirt.mode) & Sys->CHDIR ) | |
| 147 | + return FALSE; | |
| 148 | + hardremove(topath); | |
| 149 | + } | |
| 150 | + dirf.name = toname; | |
| 151 | + if ( sys->wstat(this.path.str, dirf) >= 0 ) | |
| 152 | + return TRUE; | |
| 153 | + } | |
| 154 | + #open the from file.... | |
| 155 | + if ( (fdf := sys->open(this.path.str, Sys->OREAD)) == nil ) | |
| 156 | + return FALSE; | |
| 157 | + | |
| 158 | + #open the to file.... | |
| 159 | + if ( (fdt := sys->create(p0.path.str, Sys->OWRITE, dirf.mode)) == nil ) | |
| 160 | + return FALSE;; | |
| 161 | + | |
| 162 | + #copy data from from file to to file.... | |
| 163 | + if ( (stat := copy1(fdf, fdt)) == TRUE ) { | |
| 164 | + fdf = nil; | |
| 165 | + if ( sys->remove(this.path.str) < 0 ) | |
| 166 | + return FALSE; | |
| 167 | + } | |
| 168 | + else { | |
| 169 | + fdt = nil; | |
| 170 | + sys->remove(p0.path.str); | |
| 171 | + } | |
| 172 | + return stat; | |
| 173 | +}#<< | |
| 174 | + | |
| 175 | +delete0_Z( this : ref File_obj) : int | |
| 176 | +{#>> | |
| 177 | + if (isFile0_Z(this) == TRUE) | |
| 178 | + return (remove0_b(this)); | |
| 179 | + return (FALSE); | |
| 180 | +}#<< | |
| 181 | + | |
| 182 | +rmdir0_Z( this : ref File_obj) : int | |
| 183 | +{#>> | |
| 184 | + if (isDirectory0_Z(this) == TRUE) | |
| 185 | + return (remove0_b(this)); | |
| 186 | + return (FALSE); | |
| 187 | +}#<< | |
| 188 | + | |
| 189 | +list0_aString( this : ref File_obj) : JArrayJString | |
| 190 | +{#>> | |
| 191 | + fd := sys->open(this.path.str, sys->OREAD); | |
| 192 | + if(fd == nil) { | |
| 193 | + return nil; | |
| 194 | + } | |
| 195 | + | |
| 196 | + dir_array := array[200] of Sys->Dir; | |
| 197 | + n := 0; | |
| 198 | + for(;;){ | |
| 199 | + if(len dir_array - n == 0){ | |
| 200 | + # expand dir_array | |
| 201 | + nd := array[2 * len dir_array] of Sys->Dir; | |
| 202 | + nd[0:] = dir_array; | |
| 203 | + dir_array = nd; | |
| 204 | + } | |
| 205 | + nr := sys->dirread(fd, dir_array[n:]); | |
| 206 | + if(nr < 0) | |
| 207 | + return nil; | |
| 208 | + if(nr == 0) | |
| 209 | + break; | |
| 210 | + n += nr; | |
| 211 | + } | |
| 212 | + file_name := array[n] of string; | |
| 213 | + | |
| 214 | + for(i := 0; i < n; i++) | |
| 215 | + file_name[i] = dir_array[i].name; | |
| 216 | + | |
| 217 | + return (jni->MkAString(file_name)); | |
| 218 | +}#<< | |
| 219 | + | |
| 220 | +canonPath_rString_rString( this : ref File_obj, p0 : JString) : JString | |
| 221 | +{#>> | |
| 222 | + TRACE_1 := this; # to remove warning msg at compile time; | |
| 223 | + | |
| 224 | + path := pathname(p0.str) + "/"; | |
| 225 | + | |
| 226 | + regex := load Regex Regex->PATH; | |
| 227 | + if ( regex == nil ) | |
| 228 | + jni->InitError( sys->sprint( "java.io.File: could not load %s: %r", Regex->PATH ) ); | |
| 229 | + | |
| 230 | + path = squeeze_out(regex, regex->compile("//", 0), "/", path); | |
| 231 | + path = squeeze_out(regex, regex->compile("/\\./", 0), "/", path); | |
| 232 | + path = squeeze_out(regex, regex->compile("/[^/]+/\\.\\./", 0), "/", path); | |
| 233 | + | |
| 234 | + if ( len path > 1 && path[len path - 1] == '/' ) | |
| 235 | + path = path[0:len path - 1]; | |
| 236 | + | |
| 237 | + return (jni->NewString( path)); | |
| 238 | +}#<< | |
| 239 | + | |
| 240 | +isAbsolute_Z( this : ref File_obj) : int | |
| 241 | +{#>> | |
| 242 | + if (str_mod->prefix("/", this.path.str)) | |
| 243 | + return (TRUE); | |
| 244 | + return (FALSE); | |
| 245 | +}#<< | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | +remove0_b( this : ref File_obj) : int | |
| 252 | +{ | |
| 253 | + if (sys->remove(this.path.str) < 0) | |
| 254 | + return (FALSE); | |
| 255 | + return (TRUE); | |
| 256 | +} | |
| 257 | + | |
| 258 | +copy1(fdf, fdt : ref Sys->FD): int | |
| 259 | +{ | |
| 260 | + n : int; | |
| 261 | + buf := array[8192] of byte; | |
| 262 | + | |
| 263 | + for ( ; ; ) { | |
| 264 | + n = sys->read(fdf, buf, len buf); | |
| 265 | + if (n<=0) | |
| 266 | + break; | |
| 267 | + n1 := sys->write(fdt, buf, n); | |
| 268 | + if ( n1 != n ) | |
| 269 | + return FALSE; | |
| 270 | + } | |
| 271 | + if ( n < 0 ) | |
| 272 | + return FALSE; | |
| 273 | + return TRUE; | |
| 274 | +} | |
| 275 | + | |
| 276 | +#convert a file name into complete path name | |
| 277 | +pathname(p : string) : string | |
| 278 | +{ | |
| 279 | + if ( p == nil || p[0] == '/' ) | |
| 280 | + return p; | |
| 281 | + gwd := load Workdir Workdir->PATH; | |
| 282 | + if ( gwd == nil ) | |
| 283 | + jni->InitError( sys->sprint( "java.io.File: could not load %s: %r", Workdir->PATH ) ); | |
| 284 | + | |
| 285 | + wd := gwd->init(); | |
| 286 | + if ( len wd == 0 ) | |
| 287 | + return p; | |
| 288 | + return wd + "/" + p; | |
| 289 | +} | |
| 290 | + | |
| 291 | +#pull out the name of the file only | |
| 292 | +split(name : string): (string,string) | |
| 293 | +{ | |
| 294 | + (d,t) := str_mod->splitr(name, "/"); | |
| 295 | + if ( d != nil ) | |
| 296 | + return(d,t); | |
| 297 | + else if ( name == ".." ) | |
| 298 | + return("../","."); | |
| 299 | + else | |
| 300 | + return("./",name); | |
| 301 | +} | |
| 302 | + | |
| 303 | +# return TRUE if file a is same as file b | |
| 304 | +samefile(a,b : string): int | |
| 305 | +{ | |
| 306 | + if ( a == b ) | |
| 307 | + return 1; | |
| 308 | + (i, file_a) := sys->stat(a); | |
| 309 | + (j, file_b) := sys->stat(b); | |
| 310 | + if ( i < 0 || j < 0 ) | |
| 311 | + return 0; | |
| 312 | + i = ((file_a.qid.path == file_b.qid.path) && (file_a.qid.vers == file_b.qid.vers) && | |
| 313 | + (file_a.dev == file_b.dev) && (file_a.dtype == file_b.dtype)); | |
| 314 | + return i; | |
| 315 | +} | |
| 316 | + | |
| 317 | +hardremove(a: string) | |
| 318 | +{ | |
| 319 | + do; while ( sys->remove(a) != -1 ); | |
| 320 | +} | |
| 321 | + | |
| 322 | +squeeze_out(r : Regex, pat : Regex->Re, repl, str :string) : string | |
| 323 | +{ | |
| 324 | + while ( str_mod->prefix("/../", str) ) | |
| 325 | + str = str[3:]; | |
| 326 | + a := r->execute(pat, str); | |
| 327 | + if (a == nil) | |
| 328 | + return str; | |
| 329 | + (beg, end) := a[0]; | |
| 330 | + str = str[0:beg] + repl + str[end:]; | |
| 331 | + return squeeze_out(r, pat, repl, str); | |
| 332 | +} | |
| @@ -0,0 +1,27 @@ | ||
| 1 | +# javal v1.3 generated file: edit with care | |
| 2 | + | |
| 3 | +File_L : module | |
| 4 | +{ | |
| 5 | + File_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + path : JString; | |
| 9 | + }; | |
| 10 | + | |
| 11 | + init : fn( jni_p : JNI ); | |
| 12 | + exists0_Z : fn( this : ref File_obj) : int; | |
| 13 | + canWrite0_Z : fn( this : ref File_obj) : int; | |
| 14 | + canRead0_Z : fn( this : ref File_obj) : int; | |
| 15 | + isFile0_Z : fn( this : ref File_obj) : int; | |
| 16 | + isDirectory0_Z : fn( this : ref File_obj) : int; | |
| 17 | + lastModified0_J : fn( this : ref File_obj) : big; | |
| 18 | + length0_J : fn( this : ref File_obj) : big; | |
| 19 | + mkdir0_Z : fn( this : ref File_obj) : int; | |
| 20 | + renameTo0_rFile_Z : fn( this : ref File_obj, p0 : ref File_obj) : int; | |
| 21 | + delete0_Z : fn( this : ref File_obj) : int; | |
| 22 | + rmdir0_Z : fn( this : ref File_obj) : int; | |
| 23 | + list0_aString : fn( this : ref File_obj) : JArrayJString; | |
| 24 | + canonPath_rString_rString : fn( this : ref File_obj, p0 : JString) : JString; | |
| 25 | + isAbsolute_Z : fn( this : ref File_obj) : int; | |
| 26 | + | |
| 27 | +}; | |
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
| @@ -0,0 +1,397 @@ | ||
| 1 | +implement ObjectInputStream_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + str : import jni; | |
| 28 | + FALSE : import jni; | |
| 29 | + TRUE : import jni; | |
| 30 | +#<< | |
| 31 | + | |
| 32 | +include "ObjectInputStream_L.m"; | |
| 33 | + | |
| 34 | +#>> extra post includes here | |
| 35 | +include "workdir.m"; | |
| 36 | +include "regex.m"; | |
| 37 | +str_mod : String; | |
| 38 | +ClassData, Value : import jni; | |
| 39 | +cast : Cast; | |
| 40 | +low : Low; | |
| 41 | +#<< | |
| 42 | + | |
| 43 | +init( jni_p : JNI ) | |
| 44 | +{ | |
| 45 | + # save java native inteface mod instance | |
| 46 | + jni = jni_p; | |
| 47 | + #>>extra initialization here | |
| 48 | + sys = jni->sys; | |
| 49 | + str_mod = jni->str; | |
| 50 | + cast = jni->CastMod(); | |
| 51 | + low = jni->LowMod(); | |
| 52 | + #<< | |
| 53 | +} | |
| 54 | + | |
| 55 | +loadClass0_rClass_rString_rClass( this : ref ObjectInputStream_obj, p0 : JClass,p1 : JString) : JClass | |
| 56 | +{#>> | |
| 57 | + TRACE_1 := (this, p0); | |
| 58 | + if(p1.str[0] == '[') | |
| 59 | + return jni->LookupArrayClass(p1.str); | |
| 60 | + else | |
| 61 | + return jni->GetClassObject( jni->FindClass(p1.str) ); | |
| 62 | +}#<< | |
| 63 | + | |
| 64 | +inputClassFields_rObject_rClass_aI_V( this : JObject, p0 : JObject,p1 : JClass,p2 : JArrayI) | |
| 65 | +{#>> | |
| 66 | + #p0 the object being inputted | |
| 67 | + #p1 class being referred to | |
| 68 | + #p2 fieldSequence array | |
| 69 | + | |
| 70 | + ok : int; | |
| 71 | + val : ref Value; | |
| 72 | + # | |
| 73 | + # get all fields except the transient and static | |
| 74 | + # | |
| 75 | + fields_n_sigs := jni->GetFieldSignatures(p1, (JNI->ACC_STATIC|JNI->ACC_TRANSIENT)); | |
| 76 | + # | |
| 77 | + # for each field, parse out the field name and signature. Then based on the | |
| 78 | + # signature, call the appropriate read routine. | |
| 79 | + # | |
| 80 | + for (i:=0; i < len p2.ary; i += 2) { | |
| 81 | + fldindex := p2.ary[i+1]; | |
| 82 | + | |
| 83 | + (str_part, tmp_str) := str_mod->splitl((fields_n_sigs.ary[fldindex]).str, " "); | |
| 84 | + sig_part := tmp_str[1]; | |
| 85 | + # | |
| 86 | + # call the appropriate read routine to get the value of this field | |
| 87 | + # | |
| 88 | + case sig_part { | |
| 89 | + # SIGNATURE_BYTE | |
| 90 | + 'B' => | |
| 91 | + (val, ok) = jni->CallMethod(this, "readByte", "()B", nil); | |
| 92 | + # SIGNATURE_CHAR | |
| 93 | + 'C' => | |
| 94 | + (val, ok) = jni->CallMethod(this, "readChar", "()C", nil); | |
| 95 | + # SIGNATURE_FLOAT | |
| 96 | + 'F' => | |
| 97 | + (val, ok) = jni->CallMethod(this, "readFloat", "()F", nil); | |
| 98 | + # SIGNATURE_DOUBLE | |
| 99 | + 'D' => | |
| 100 | + (val, ok) = jni->CallMethod(this, "readDouble", "()D", nil); | |
| 101 | + # SIGNATURE_INT | |
| 102 | + 'I' => | |
| 103 | + (val, ok) = jni->CallMethod(this, "readInt", "()I", nil); | |
| 104 | + # SIGNATURE_LONG | |
| 105 | + 'J' => | |
| 106 | + (val, ok) = jni->CallMethod(this, "readLong", "()J", nil); | |
| 107 | + # SIGNATURE_SHORT | |
| 108 | + 'S' => | |
| 109 | + (val, ok) = jni->CallMethod(this, "readShort", "()S", nil); | |
| 110 | + # SIGNATURE_BOOLEAN | |
| 111 | + 'Z' => | |
| 112 | + (val, ok) = jni->CallMethod(this, "readBoolean", "()Z", nil); | |
| 113 | + # SIGNATURE_ARRAY | |
| 114 | + '[' => | |
| 115 | + (val, ok) = jni->CallMethod(this, "readObject", "()Ljava/lang/Object;", nil); | |
| 116 | + # SIGNATURE_CLASS | |
| 117 | + 'L' => | |
| 118 | + (val, ok) = jni->CallMethod(this, "readObject", "()Ljava/lang/Object;", nil); | |
| 119 | + } | |
| 120 | + # | |
| 121 | + # now take that just readin value and store into the object. | |
| 122 | + # | |
| 123 | + if (ok == JNI->OK) | |
| 124 | + jni->SetObjField(p0, str_part, val); | |
| 125 | + } | |
| 126 | +}#<< | |
| 127 | + | |
| 128 | +inputArrayValues_rObject_rClass_V( this : JObject, p0 : JObject,p1 : JClass) | |
| 129 | +{#>> | |
| 130 | + # p0 is an array of Objects. We have to look at the signature | |
| 131 | + # of the array to find what the Objects really are. | |
| 132 | + # | |
| 133 | + # p1 the class name of the elements of the array (this is also | |
| 134 | + # the arrays signature) | |
| 135 | + # | |
| 136 | + # make sure this is an array we have. If so, get its length. | |
| 137 | + # | |
| 138 | + if ( jni->IsArray(p0) == JNI->FALSE) { | |
| 139 | + jni->ThrowException("java.io.InvalidClassException", "Not an array"); | |
| 140 | + } | |
| 141 | + length := jni->GetArrayLength(cast->ToJArray(p0)); | |
| 142 | + ok : int; | |
| 143 | + val : ref Value; | |
| 144 | + | |
| 145 | + # | |
| 146 | + # dispatch on the signature of the array and read in each element. | |
| 147 | + # | |
| 148 | + i : int; | |
| 149 | + case p1.aryname[1] { | |
| 150 | + # SIGNATURE_BYTE | |
| 151 | + 'B' => | |
| 152 | + { | |
| 153 | + mul_args := array[3] of ref Value; | |
| 154 | + mul_args[0] = ref Value.TObject(p0); | |
| 155 | + mul_args[1] = ref Value.TInt(0); | |
| 156 | + mul_args[2] = ref Value.TInt(length); | |
| 157 | + (val, ok) = jni->CallMethod(this, "readFully", "([BII)V", mul_args); | |
| 158 | + } | |
| 159 | + # SIGNATURE_CHAR | |
| 160 | + 'C' => | |
| 161 | + { | |
| 162 | + JAChar := cast->ToJArrayI(p0); | |
| 163 | + for (i = 0; i < length; i++) { | |
| 164 | + (val, ok) = jni->CallMethod(this, "readChar", "()C", nil); | |
| 165 | + JAChar.ary[i] = val.Char(); | |
| 166 | + } | |
| 167 | + } | |
| 168 | + # SIGNATURE_FLOAT | |
| 169 | + 'F' => | |
| 170 | + { | |
| 171 | + JAFloat := cast->ToJArrayF(p0); | |
| 172 | + for (i = 0; i < length; i++) { | |
| 173 | + (val, ok) = jni->CallMethod(this, "readFloat", "()F", nil); | |
| 174 | + JAFloat.ary[i] = val.Float(); | |
| 175 | + } | |
| 176 | + } | |
| 177 | + # SIGNATURE_DOUBLE | |
| 178 | + 'D' => | |
| 179 | + { | |
| 180 | + JADouble := cast->ToJArrayD(p0); | |
| 181 | + for (i = 0; i < length; i++) { | |
| 182 | + (val, ok) = jni->CallMethod(this, "readDouble", "()D", nil); | |
| 183 | + JADouble.ary[i] = val.Double(); | |
| 184 | + } | |
| 185 | + } | |
| 186 | + # SIGNATURE_INT | |
| 187 | + 'I' => | |
| 188 | + { | |
| 189 | + JAInt := cast->ToJArrayI(p0); | |
| 190 | + for (i = 0; i < length; i++) { | |
| 191 | + (val, ok) = jni->CallMethod(this, "readInt", "()I", nil); | |
| 192 | + JAInt.ary[i] = val.Int(); | |
| 193 | + } | |
| 194 | + } | |
| 195 | + # SIGNATURE_LONG | |
| 196 | + 'J' => | |
| 197 | + { | |
| 198 | + JALong := cast->ToJArrayJ(p0); | |
| 199 | + for (i = 0; i < length; i++) { | |
| 200 | + (val, ok) = jni->CallMethod(this, "readLong", "()J", nil); | |
| 201 | + JALong.ary[i] = val.Long(); | |
| 202 | + } | |
| 203 | + } | |
| 204 | + # SIGNATURE_SHORT | |
| 205 | + 'S' => | |
| 206 | + { | |
| 207 | + JAShort := cast->ToJArrayI(p0); | |
| 208 | + for (i = 0; i < length; i++) { | |
| 209 | + (val, ok) = jni->CallMethod(this, "readShort", "()S", nil); | |
| 210 | + JAShort.ary[i] = val.Short(); | |
| 211 | + } | |
| 212 | + } | |
| 213 | + # SIGNATURE_BOOLEAN | |
| 214 | + 'Z' => | |
| 215 | + { | |
| 216 | + JABool := cast->ToJArrayZ(p0); | |
| 217 | + for (i = 0; i < length; i++) { | |
| 218 | + (val, ok) = jni->CallMethod(this, "readBoolean", "()Z", nil); | |
| 219 | + JABool.ary[i] = byte val.Boolean(); | |
| 220 | + } | |
| 221 | + } | |
| 222 | + # SIGNATURE_ARRAY | |
| 223 | + '[' => | |
| 224 | + { | |
| 225 | + JAObj := cast->ToJArrayJObject(p0); | |
| 226 | + for (i = 0; i < length; i++) { | |
| 227 | + (val, ok) = jni->CallMethod(this, "readObject", "()Ljava/lang/Object;", nil); | |
| 228 | + JAObj.ary[i] = val.Object(); | |
| 229 | + } | |
| 230 | + } | |
| 231 | + # SIGNATURE_CLASS | |
| 232 | + 'L' => | |
| 233 | + { | |
| 234 | + JAObj := cast->ToJArrayJObject(p0); | |
| 235 | + for (i = 0; i < length; i++) { | |
| 236 | + (val, ok) = jni->CallMethod(this, "readObject", "()Ljava/lang/Object;", nil); | |
| 237 | + JAObj.ary[i] = val.Object(); | |
| 238 | + } | |
| 239 | + } | |
| 240 | + } | |
| 241 | +}#<< | |
| 242 | + | |
| 243 | +# | |
| 244 | +# Does class c directly implement interface iface? | |
| 245 | +# | |
| 246 | +directImp(c: ClassData, iface: string): int | |
| 247 | +{ | |
| 248 | + l := c.interdirect; | |
| 249 | + while(l != nil) { | |
| 250 | + i := hd l; | |
| 251 | + if(i.name == iface) | |
| 252 | + return 1; | |
| 253 | + l = tl l; | |
| 254 | + } | |
| 255 | + return 0; | |
| 256 | +} | |
| 257 | + | |
| 258 | +# | |
| 259 | +# If c directly implements Externalizable, then call its default | |
| 260 | +# constructor (if there is one). | |
| 261 | +# Otherwise, c must directly implement Serializable. In this case, | |
| 262 | +# find the nearest super that doesn't implement Serializable and call | |
| 263 | +# its default constructor (if there is one). | |
| 264 | +# In either case, if there is a constructor to call, then it must be public. | |
| 265 | +# If not, an IllegalAccessException is thrown. | |
| 266 | +# | |
| 267 | + | |
| 268 | +callCtor(c: ClassData, o: JObject) | |
| 269 | +{ | |
| 270 | + if(directImp(c, "java/io/Externalizable") == 0) { | |
| 271 | + if(directImp(c, "java/io/Serializable") == 0) | |
| 272 | + return; | |
| 273 | + c = c.super; | |
| 274 | + while(c != nil) { | |
| 275 | + if(directImp(c, "java/io/Serializable") == 0) | |
| 276 | + break; | |
| 277 | + c = c.super; | |
| 278 | + } | |
| 279 | + } | |
| 280 | + if(c == nil) | |
| 281 | + return; | |
| 282 | + (mod, ix) := jni->FindMethod(c, "<init>", "()V", JNI->METH_INIT); | |
| 283 | + if(mod == nil) | |
| 284 | + return; | |
| 285 | + flags := jni->GetMethodFlags(c.this, "<init> ()V"); | |
| 286 | + if((flags & JNI->ACC_PUBLIC) == 0) | |
| 287 | + jni->ThrowException("java.lang.IllegalAccessException", ""); | |
| 288 | + low->CallMethod(mod, ix, o, array[0] of ref Value, nil); | |
| 289 | +} | |
| 290 | + | |
| 291 | +# | |
| 292 | +# Allocate a new object of class p0. | |
| 293 | +# | |
| 294 | +allocateNewObject_rClass_rClass_rObject(p0 : JClass, p1 : JClass) : JObject | |
| 295 | +{#>> | |
| 296 | + TRACE_1 := p1; | |
| 297 | + o := jni->AllocObject(p0.class); | |
| 298 | + callCtor(p0.class, o); | |
| 299 | + return o; | |
| 300 | +}#<< | |
| 301 | + | |
| 302 | +allocateNewArray_rClass_I_rObject( p0 : JClass,p1 : int) : JObject | |
| 303 | +{#>> | |
| 304 | + # | |
| 305 | + # p0 is the class of the array elements | |
| 306 | + # p1 is number of elelments. | |
| 307 | + # | |
| 308 | + # | |
| 309 | + # example transformation..... | |
| 310 | + # jni->MkALong(array[p1] of big) ==> JArrayJ | |
| 311 | + # cast->BigToJArray(JArrayJ (aka BigArray)) ==> JArray | |
| 312 | + # cast->FromJArray(JArray) ==> JObject | |
| 313 | + # | |
| 314 | + case p0.aryname[1] { | |
| 315 | + # SIGNATURE_BYTE | |
| 316 | + 'B' => | |
| 317 | + { | |
| 318 | + # limbo array ==>JArrayB ==>JArray ==>JObject | |
| 319 | + return (cast->FromJArray(cast->ByteToJArray(jni->MkAByte(array[p1] of byte)))); | |
| 320 | + } | |
| 321 | + # SIGNATURE_CHAR | |
| 322 | + 'C' => | |
| 323 | + { | |
| 324 | + # limbo array ==>JArrayC ==>JArray ==>JObject | |
| 325 | + return (cast->FromJArray(cast->IntToJArray(jni->MkAChar(array[p1] of int)))); | |
| 326 | + } | |
| 327 | + # SIGNATURE_FLOAT | |
| 328 | + 'F' => | |
| 329 | + { | |
| 330 | + # limbo array ==>JArrayF ==>JArray ==>JObject | |
| 331 | + return (cast->FromJArray(cast->RealToJArray(jni->MkAFloat(array[p1] of real)))); | |
| 332 | + } | |
| 333 | + # SIGNATURE_DOUBLE | |
| 334 | + 'D' => | |
| 335 | + { | |
| 336 | + # limbo array ==>JArrayD ==>JArray ==>JObject | |
| 337 | + return (cast->FromJArray(cast->RealToJArray(jni->MkADouble(array[p1] of real)))); | |
| 338 | + } | |
| 339 | + # SIGNATURE_INT | |
| 340 | + 'I' => | |
| 341 | + { | |
| 342 | + # limbo array ==>JArrayI ==>JArray ==>JObject | |
| 343 | + return (cast->FromJArray(cast->IntToJArray(jni->MkAInt(array[p1] of int)))); | |
| 344 | + } | |
| 345 | + # SIGNATURE_LONG | |
| 346 | + 'J' => | |
| 347 | + { | |
| 348 | + # limbo array ==>JArrayJ ==>JArray ==>JObject | |
| 349 | + return (cast->FromJArray(cast->BigToJArray(jni->MkALong(array[p1] of big)))); | |
| 350 | + } | |
| 351 | + # SIGNATURE_SHORT | |
| 352 | + 'S' => | |
| 353 | + { | |
| 354 | + # limbo array ==>JArrayS ==>JArray ==>JObject | |
| 355 | + return (cast->FromJArray(cast->IntToJArray(jni->MkAShort(array[p1] of int)))); | |
| 356 | + } | |
| 357 | + # SIGNATURE_BOOLEAN | |
| 358 | + 'Z' => | |
| 359 | + { | |
| 360 | + # limbo array ==>JArrayZ ==>JArray ==>JObject | |
| 361 | + return (cast->FromJArray(cast->ByteToJArray(jni->MkABoolean(array[p1] of byte)))); | |
| 362 | + } | |
| 363 | + # SIGNATURE_ARRAY | |
| 364 | + '[' => | |
| 365 | + { | |
| 366 | + objarray := cast->ObjectToJArray(jni->MkAObject(array[p1] of JObject)); | |
| 367 | + desc := jni->JSigToDescriptor(p0.aryname); | |
| 368 | + objarray.dims = desc.dims; | |
| 369 | + objarray.class = desc.class; | |
| 370 | + objarray.primitive = desc.prim; | |
| 371 | + return (cast->FromJArray(objarray)); | |
| 372 | + } | |
| 373 | + # SIGNATURE_CLASS | |
| 374 | + 'L' => | |
| 375 | + { | |
| 376 | + objarray := cast->ObjectToJArray(jni->MkAObject(array[p1] of JObject)); | |
| 377 | + objarray.class = jni->FindClass(p0.aryname[2:len p0.aryname-1]); | |
| 378 | + return (cast->FromJArray(objarray)); | |
| 379 | + } | |
| 380 | + } | |
| 381 | + jni->ThrowException("java.io.InvalidClassException", "Unknown signature"); | |
| 382 | + return nil; | |
| 383 | +}#<< | |
| 384 | + | |
| 385 | +invokeObjectReader_rObject_rClass_Z( this : JObject, p0 : JObject,p1 : JClass) : int | |
| 386 | +{#>> | |
| 387 | + junk := p1; | |
| 388 | + # | |
| 389 | + # call readObject() on object "p0" with an argument of "this" | |
| 390 | + # | |
| 391 | + MyValueArray := array[] of { | |
| 392 | + ref Value.TObject(this) | |
| 393 | + }; | |
| 394 | + (a, b) := jni->CallMethod(p0, "readObject", "(Ljava/io/ObjectInputStream;)V", MyValueArray); | |
| 395 | + | |
| 396 | + return b == JNI->OK; | |
| 397 | +}#<< | |
| @@ -0,0 +1,36 @@ | ||
| 1 | +# generated file edit with care | |
| 2 | + | |
| 3 | +ObjectInputStream_L : module | |
| 4 | +{ | |
| 5 | + ObjectInputStream_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + in : JObject; | |
| 9 | + count : int; | |
| 10 | + blockDataMode : byte; | |
| 11 | + dis : JObject; | |
| 12 | + abortIOException : JObject; | |
| 13 | + abortClassNotFoundException : JObject; | |
| 14 | + currentObject : JObject; | |
| 15 | + currentClassDesc : JObject; | |
| 16 | + currentClass : JClass; | |
| 17 | + classdesc : JArrayJObject; | |
| 18 | +# classes : JArrayJClass; | |
| 19 | + spClass : int; | |
| 20 | + wireHandle2Object : JObject; | |
| 21 | + nextWireOffset : int; | |
| 22 | + callbacks : JObject; | |
| 23 | + recursionDepth : int; | |
| 24 | + currCode : byte; | |
| 25 | + enableResolve : byte; | |
| 26 | + }; | |
| 27 | + | |
| 28 | + init : fn( jni_p : JNI ); | |
| 29 | + loadClass0_rClass_rString_rClass : fn( this : ref ObjectInputStream_obj, p0 : JClass,p1 : JString) : JClass; | |
| 30 | + inputClassFields_rObject_rClass_aI_V : fn( this : JObject, p0 : JObject,p1 : JClass,p2 : JArrayI); | |
| 31 | + inputArrayValues_rObject_rClass_V : fn( this : JObject, p0 : JObject,p1 : JClass); | |
| 32 | + allocateNewObject_rClass_rClass_rObject : fn( p0 : JClass,p1 : JClass) : JObject; | |
| 33 | + allocateNewArray_rClass_I_rObject : fn( p0 : JClass,p1 : int) : JObject; | |
| 34 | + invokeObjectReader_rObject_rClass_Z : fn( this : JObject, p0 : JObject,p1 : JClass) : int; | |
| 35 | + | |
| 36 | +}; | |
Empty file added.
Empty file added.
Empty file added.
| @@ -0,0 +1,257 @@ | ||
| 1 | +implement ObjectOutputStream_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + str : import jni; | |
| 28 | + FALSE : import jni; | |
| 29 | + TRUE : import jni; | |
| 30 | +#<< | |
| 31 | + | |
| 32 | +include "ObjectOutputStream_L.m"; | |
| 33 | + | |
| 34 | +#>> extra post includes here | |
| 35 | +include "workdir.m"; | |
| 36 | +include "regex.m"; | |
| 37 | +str_mod : String; | |
| 38 | +Value : import jni; | |
| 39 | +cast : Cast; | |
| 40 | +#<< | |
| 41 | + | |
| 42 | +init( jni_p : JNI ) | |
| 43 | +{ | |
| 44 | + # save java native inteface mod instance | |
| 45 | + jni = jni_p; | |
| 46 | + #>>extra initialization here | |
| 47 | + sys = jni->sys; | |
| 48 | + str_mod = jni->str; | |
| 49 | + cast = jni->CastMod(); | |
| 50 | + #<< | |
| 51 | +} | |
| 52 | + | |
| 53 | +outputClassFields_rObject_rClass_aI_V( this : JObject, p0 : JObject,p1 : JClass,p2 : JArrayI) | |
| 54 | +{#>> | |
| 55 | + | |
| 56 | + class := jni->GetObjectClass(p0); | |
| 57 | + #p0 the object being outputted | |
| 58 | + #p1 class being referred to | |
| 59 | + #p2 fieldSequence array | |
| 60 | + | |
| 61 | + a : ref Value; | |
| 62 | + b : int; | |
| 63 | + # | |
| 64 | + # get all fields except the transient and static | |
| 65 | + # | |
| 66 | + fields_n_sigs := jni->GetFieldSignatures(p1, (JNI->ACC_STATIC|JNI->ACC_TRANSIENT)); | |
| 67 | + # | |
| 68 | + # for each field, parse out the field name and signature. Then based on the | |
| 69 | + # signature, call the appropriate write routine. | |
| 70 | + # | |
| 71 | + for (i:=0; i < len p2.ary; i += 2) { | |
| 72 | + fldindex := p2.ary[i+1]; | |
| 73 | + | |
| 74 | + (str_part, tmp_str) := str_mod->splitl((fields_n_sigs.ary[fldindex]).str, " "); | |
| 75 | + sig_part := tmp_str[1]; | |
| 76 | + # | |
| 77 | + # get the value of this field and call the write routine | |
| 78 | + # | |
| 79 | + argv := array[] of { | |
| 80 | + jni->GetObjField(p0, str_part, tmp_str[1:]) | |
| 81 | + }; | |
| 82 | + pick v := argv[0] { | |
| 83 | + TByte => | |
| 84 | + argv[0] = ref Value.TInt(v.jbyte); | |
| 85 | + TChar => | |
| 86 | + argv[0] = ref Value.TInt(v.jchar); | |
| 87 | + TShort => | |
| 88 | + argv[0] = ref Value.TInt(v.jshort); | |
| 89 | + } | |
| 90 | + case sig_part { | |
| 91 | + # SIGNATURE_BYTE | |
| 92 | + 'B' => | |
| 93 | + (a, b) = jni->CallMethod(this, "writeByte", "(I)V", argv); | |
| 94 | + # SIGNATURE_CHAR | |
| 95 | + 'C' => | |
| 96 | + (a, b) = jni->CallMethod(this, "writeChar", "(I)V", argv); | |
| 97 | + # SIGNATURE_FLOAT | |
| 98 | + 'F' => | |
| 99 | + (a, b) = jni->CallMethod(this, "writeFloat", "(F)V", argv); | |
| 100 | + # SIGNATURE_DOUBLE | |
| 101 | + 'D' => | |
| 102 | + (a, b) = jni->CallMethod(this, "writeDouble", "(D)V", argv); | |
| 103 | + # SIGNATURE_INT | |
| 104 | + 'I' => | |
| 105 | + (a, b) = jni->CallMethod(this, "writeInt", "(I)V", argv); | |
| 106 | + # SIGNATURE_LONG | |
| 107 | + 'J' => | |
| 108 | + (a, b) = jni->CallMethod(this, "writeLong", "(J)V", argv); | |
| 109 | + # SIGNATURE_SHORT | |
| 110 | + 'S' => | |
| 111 | + (a, b) = jni->CallMethod(this, "writeShort", "(I)V", argv); | |
| 112 | + # SIGNATURE_BOOLEAN | |
| 113 | + 'Z' => | |
| 114 | + (a, b) = jni->CallMethod(this, "writeBoolean", "(Z)V", argv); | |
| 115 | + # SIGNATURE_ARRAY | |
| 116 | + '[' => | |
| 117 | + (a, b) = jni->CallMethod(this, "writeObject", "(Ljava/lang/Object;)V", argv); | |
| 118 | + # SIGNATURE_CLASS | |
| 119 | + 'L' => | |
| 120 | + (a, b) = jni->CallMethod(this, "writeObject", "(Ljava/lang/Object;)V", argv); | |
| 121 | + } | |
| 122 | + } | |
| 123 | +}#<< | |
| 124 | + | |
| 125 | +outputArrayValues_rObject_rClass_V( this : JObject, p0 : JObject,p1 : JClass) | |
| 126 | +{#>> | |
| 127 | + # p0 the array being outputted | |
| 128 | + # p1 the class name of the elements of the array (this is also the arrays signature) | |
| 129 | + # | |
| 130 | + # | |
| 131 | + # make sure this is an array we have. If so, get the | |
| 132 | + # length and write it out. | |
| 133 | + # | |
| 134 | + if ( jni->IsArray(p0) == JNI->FALSE) { | |
| 135 | + jni->ThrowException("java.io.InvalidClassException", "Not an array"); | |
| 136 | + } | |
| 137 | + length := jni->GetArrayLength(cast->ToJArray(p0)); | |
| 138 | + argv := array[1] of ref Value; | |
| 139 | + argv[0] = ref Value.TInt(length); | |
| 140 | + (a, b) := jni->CallMethod(this, "writeInt", "(I)V", argv); | |
| 141 | + | |
| 142 | + # | |
| 143 | + # dispatch on the signature of the array and print out each element. | |
| 144 | + # | |
| 145 | + i : int; | |
| 146 | + case p1.aryname[1] { | |
| 147 | + # SIGNATURE_BYTE | |
| 148 | + 'B' => | |
| 149 | + { | |
| 150 | + JAByte := cast->ToJArrayB(p0); | |
| 151 | + for (i = 0; i < length; i++) { | |
| 152 | + argv[0] = ref Value.TInt(int JAByte.ary[i]); | |
| 153 | + (a, b) = jni->CallMethod(this, "writeByte", "(I)V", argv); | |
| 154 | + } | |
| 155 | + } | |
| 156 | + # SIGNATURE_CHAR | |
| 157 | + 'C' => | |
| 158 | + { | |
| 159 | + JAChar := cast->ToJArrayI(p0); | |
| 160 | + for (i = 0; i < length; i++) { | |
| 161 | + argv[0] = ref Value.TInt(JAChar.ary[i]); | |
| 162 | + (a, b) = jni->CallMethod(this, "writeChar", "(I)V", argv); | |
| 163 | + } | |
| 164 | + } | |
| 165 | + # SIGNATURE_FLOAT | |
| 166 | + 'F' => | |
| 167 | + { | |
| 168 | + JAFloat := cast->ToJArrayF(p0); | |
| 169 | + for (i = 0; i < length; i++) { | |
| 170 | + argv[0] = ref Value.TFloat(JAFloat.ary[i]); | |
| 171 | + (a, b) = jni->CallMethod(this, "writeFloat", "(F)V", argv); | |
| 172 | + } | |
| 173 | + } | |
| 174 | + # SIGNATURE_DOUBLE | |
| 175 | + 'D' => | |
| 176 | + { | |
| 177 | + JADouble := cast->ToJArrayD(p0); | |
| 178 | + for (i = 0; i < length; i++) { | |
| 179 | + argv[0] = ref Value.TDouble(JADouble.ary[i]); | |
| 180 | + (a, b) = jni->CallMethod(this, "writeDouble", "(D)V", argv); | |
| 181 | + } | |
| 182 | + } | |
| 183 | + # SIGNATURE_INT | |
| 184 | + 'I' => | |
| 185 | + { | |
| 186 | + JAInt := cast->ToJArrayI(p0); | |
| 187 | + for (i = 0; i < length; i++) { | |
| 188 | + argv[0] = ref Value.TInt(JAInt.ary[i]); | |
| 189 | + (a, b) = jni->CallMethod(this, "writeInt", "(I)V", argv); | |
| 190 | + } | |
| 191 | + } | |
| 192 | + # SIGNATURE_LONG | |
| 193 | + 'J' => | |
| 194 | + { | |
| 195 | + JALong := cast->ToJArrayJ(p0); | |
| 196 | + for (i = 0; i < length; i++) { | |
| 197 | + argv[0] = ref Value.TLong(JALong.ary[i]); | |
| 198 | + (a, b) = jni->CallMethod(this, "writeLong", "(J)V", argv); | |
| 199 | + } | |
| 200 | + } | |
| 201 | + # SIGNATURE_SHORT | |
| 202 | + 'S' => | |
| 203 | + { | |
| 204 | + JAShort := cast->ToJArrayI(p0); | |
| 205 | + for (i = 0; i < length; i++) { | |
| 206 | + argv[0] = ref Value.TInt(JAShort.ary[i]); | |
| 207 | + (a, b) = jni->CallMethod(this, "writeShort", "(I)V", argv); | |
| 208 | + } | |
| 209 | + } | |
| 210 | + # SIGNATURE_BOOLEAN | |
| 211 | + 'Z' => | |
| 212 | + { | |
| 213 | + JABool := cast->ToJArrayZ(p0); | |
| 214 | + for (i = 0; i < length; i++) { | |
| 215 | + argv[0] = ref Value.TBoolean(int JABool.ary[i]); | |
| 216 | + (a, b) = jni->CallMethod(this, "writeBoolean", "(Z)V", argv); | |
| 217 | + } | |
| 218 | + } | |
| 219 | + # SIGNATURE_ARRAY | |
| 220 | + '[' => | |
| 221 | + { | |
| 222 | + JAObj := cast->ToJArrayJObject(p0); | |
| 223 | + for (i = 0; i < length; i++) { | |
| 224 | + argv[0] = ref Value.TObject(JAObj.ary[i]); | |
| 225 | + (a, b) = jni->CallMethod(this, "writeObject", "(Ljava/lang/Object;)V", argv); | |
| 226 | + } | |
| 227 | + } | |
| 228 | + # SIGNATURE_CLASS | |
| 229 | + 'L' => | |
| 230 | + { | |
| 231 | + JAObj := cast->ToJArrayJObject(p0); | |
| 232 | + for (i = 0; i < length; i++) { | |
| 233 | + argv[0] = ref Value.TObject(JAObj.ary[i]); | |
| 234 | + (a, b) = jni->CallMethod(this, "writeObject", "(Ljava/lang/Object;)V", argv); | |
| 235 | + } | |
| 236 | + } | |
| 237 | + } | |
| 238 | +}#<< | |
| 239 | + | |
| 240 | +invokeObjectWriter_rObject_rClass_Z( this : JObject, p0 : JObject,p1 : JClass) : int | |
| 241 | +{#>> | |
| 242 | + junk := p1; | |
| 243 | + # | |
| 244 | + # call writeObject() on object "p0" with an argument of "this" | |
| 245 | + # | |
| 246 | + MyValueArray := array[] of { | |
| 247 | + ref Value.TObject(this) | |
| 248 | + }; | |
| 249 | + (a, b) := jni->CallMethod(p0, "writeObject", "(Ljava/io/ObjectOutputStream;)V", MyValueArray); | |
| 250 | + | |
| 251 | + return b == JNI->OK; | |
| 252 | +}#<< | |
| 253 | + | |
| 254 | +getRefHashCode_rObject_I( p0 : JObject) : int | |
| 255 | +{#>> | |
| 256 | + return( jni->IdentityHash(p0) ); | |
| 257 | +}#<< | |
| @@ -0,0 +1,33 @@ | ||
| 1 | +# generated file edit with care | |
| 2 | + | |
| 3 | +ObjectOutputStream_L : module | |
| 4 | +{ | |
| 5 | + ObjectOutputStream_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + blockDataMode : byte; | |
| 9 | + buf : JArrayB; | |
| 10 | + count : int; | |
| 11 | + out : JObject; | |
| 12 | + dos : JObject; | |
| 13 | + abortIOException : JObject; | |
| 14 | + wireHandle2Object : JArrayJObject; | |
| 15 | + wireNextHandle : JArrayI; | |
| 16 | + wireHash2Handle : JArrayI; | |
| 17 | + nextWireOffset : int; | |
| 18 | + currentObject : JObject; | |
| 19 | + currentClassDesc : JObject; | |
| 20 | + classDescStack : JObject; | |
| 21 | + enableReplace : byte; | |
| 22 | + replaceObjects : JArrayJObject; | |
| 23 | + nextReplaceOffset : int; | |
| 24 | + recursionDepth : int; | |
| 25 | + }; | |
| 26 | + | |
| 27 | + init : fn( jni_p : JNI ); | |
| 28 | + outputClassFields_rObject_rClass_aI_V : fn( this : JObject, p0 : JObject,p1 : JClass,p2 : JArrayI); | |
| 29 | + outputArrayValues_rObject_rClass_V : fn( this : JObject, p0 : JObject,p1 : JClass); | |
| 30 | + invokeObjectWriter_rObject_rClass_Z : fn( this : JObject, p0 : JObject,p1 : JClass) : int; | |
| 31 | + getRefHashCode_rObject_I : fn( p0 : JObject) : int; | |
| 32 | + | |
| 33 | +}; | |
Empty file added.
| @@ -0,0 +1,164 @@ | ||
| 1 | +implement ObjectStreamClass_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + str : import jni; | |
| 28 | + FALSE : import jni; | |
| 29 | + TRUE : import jni; | |
| 30 | +#<< | |
| 31 | + | |
| 32 | +include "ObjectStreamClass_L.m"; | |
| 33 | + | |
| 34 | +#>> extra post includes here | |
| 35 | +include "workdir.m"; | |
| 36 | +include "regex.m"; | |
| 37 | +str_mod : String; | |
| 38 | +Value : import jni; | |
| 39 | +cast : Cast; | |
| 40 | +#<< | |
| 41 | + | |
| 42 | +init( jni_p : JNI ) | |
| 43 | +{ | |
| 44 | + # save java native inteface mod instance | |
| 45 | + jni = jni_p; | |
| 46 | + #>>extra initialization here | |
| 47 | + sys = jni->sys; | |
| 48 | + str_mod = jni->str; | |
| 49 | + cast = jni->CastMod(); | |
| 50 | + #<< | |
| 51 | +} | |
| 52 | + | |
| 53 | +getClassAccess_rClass_I( p0 : JClass) : int | |
| 54 | +{#>> | |
| 55 | + return (jni->GetClassFlags(p0) & JNI->ACC_WRITTEN_FLAGS); | |
| 56 | +}#<< | |
| 57 | + | |
| 58 | +getMethodSignatures_rClass_aString( p0 : JClass) : JArrayJString | |
| 59 | +{#>> | |
| 60 | + # Return an array of Strings containing the method names and signatures. | |
| 61 | + return (jni->GetMethodSignatures(p0, 0)); | |
| 62 | +}#<< | |
| 63 | + | |
| 64 | +getMethodAccess_rClass_rString_I( p0 : JClass,p1 : JString) : int | |
| 65 | +{#>> | |
| 66 | + return (jni->GetMethodFlags(p0, p1.str) & JNI->ACC_WRITTEN_FLAGS); | |
| 67 | +}#<< | |
| 68 | + | |
| 69 | +getFieldSignatures_rClass_aString( p0 : JClass) : JArrayJString | |
| 70 | +{#>> | |
| 71 | + # Return an array of Strings containing the field names and signatures. | |
| 72 | + return (jni->GetFieldSignatures(p0, 0)); | |
| 73 | +}#<< | |
| 74 | + | |
| 75 | +getFieldAccess_rClass_rString_I( p0 : JClass,p1 : JString) : int | |
| 76 | +{#>> | |
| 77 | + return (jni->GetFieldFlags(p0, p1.str) & JNI->ACC_WRITTEN_FLAGS); | |
| 78 | +}#<< | |
| 79 | + | |
| 80 | +getFields0_rClass_aObjectStreamField( this : ref ObjectStreamClass_obj, p0 : JClass) : JArrayJObject | |
| 81 | +{#>> | |
| 82 | + # | |
| 83 | + # Return an array of ObjectStreamField objects for each non-static and | |
| 84 | + # non-transient field of the specified class. First find and load the | |
| 85 | + # ObjectStreamField class. | |
| 86 | + # | |
| 87 | + junk := this; | |
| 88 | + cl_data := jni->FindClass("java/io/ObjectStreamField"); | |
| 89 | + if (cl_data == nil) | |
| 90 | + jni->FatalError("ObjectStreamClass could not load java/io/ObjectStreamField"); | |
| 91 | + | |
| 92 | + # | |
| 93 | + # Get a list of all non-static and non transient fields of this class. If there are | |
| 94 | + # non, jni->GetFieldSignatures() returns an array of length 0. | |
| 95 | + # | |
| 96 | + fields_n_sigs := jni->GetFieldSignatures(p0, (JNI->ACC_STATIC|JNI->ACC_TRANSIENT)); | |
| 97 | + | |
| 98 | + MyValueArray := array[4] of ref Value; | |
| 99 | + MyObjectArray := array[len fields_n_sigs.ary] of JObject; | |
| 100 | + | |
| 101 | + # | |
| 102 | + # for each non-static and non-transient fields of this class... | |
| 103 | + # call constructor for ObjectStreamField as follows | |
| 104 | + # ObjectStreamField(n, sig, o, t) | |
| 105 | + # where n is field name, sig is first byte of field signature | |
| 106 | + # o is index into class field table and if sig != [ or L, | |
| 107 | + # t is NULL. If sig is [ or L, t is signature. | |
| 108 | + # For each of those constructors that are created, stuff them into | |
| 109 | + # an array entry. | |
| 110 | + # | |
| 111 | + for (i:=0; i < len fields_n_sigs.ary; i++) { | |
| 112 | + # | |
| 113 | + # Each entry in fields_n_sigs.ary is of the format <name> <sig> where name is | |
| 114 | + # the name of the field and signature is its full signature. Seperate them | |
| 115 | + # out and format a call instruction to call the constructor for ObjectStreamField. | |
| 116 | + # | |
| 117 | + (name, full_sig) := str_mod->splitl((fields_n_sigs.ary[i]).str, " "); | |
| 118 | + full_sig = full_sig[1:]; | |
| 119 | + | |
| 120 | + MyValueArray[0] = ref Value.TObject(cast->FromJString(jni->NewString(name))); | |
| 121 | + MyValueArray[1] = ref Value.TChar(full_sig[0]); | |
| 122 | + # NOT offset of field in object (but does it matter)??? | |
| 123 | + MyValueArray[2] = ref Value.TInt(i); | |
| 124 | + if ((full_sig[0] == 'L') || (full_sig[0] == '[')) | |
| 125 | + MyValueArray[3] = ref Value.TObject(cast->FromJString(jni->NewString(full_sig))); | |
| 126 | + else | |
| 127 | + MyValueArray[3] = ref Value.TObject(nil); | |
| 128 | + | |
| 129 | + jObj := jni->AllocObject(cl_data); | |
| 130 | + (ret, ok) := jni->CallMethod(jObj, "<init>", "(Ljava/lang/String;CILjava/lang/String;)V", MyValueArray); | |
| 131 | + if (ok != JNI->OK) | |
| 132 | + jni->FatalError("ObjectStreamClass could not create ObjectStreamField"); | |
| 133 | + # | |
| 134 | + # make an array of these created objects. | |
| 135 | + # | |
| 136 | + MyObjectArray[i] = jObj; | |
| 137 | + } | |
| 138 | + # | |
| 139 | + # Finally, return the full array. | |
| 140 | + # | |
| 141 | + jary := jni->MkAObject(MyObjectArray); | |
| 142 | + jary.class = cl_data; | |
| 143 | + return jary; | |
| 144 | +}#<< | |
| 145 | + | |
| 146 | +getSerialVersionUID_rClass_J( p0 : JClass) : big | |
| 147 | +{#>> | |
| 148 | + ret : big; | |
| 149 | + val : ref Value; | |
| 150 | + val = jni->GetStaticField(p0.class, "serialVersionUID", "J"); | |
| 151 | + if (val != nil) | |
| 152 | + ret = val.Long(); | |
| 153 | + else | |
| 154 | + ret = big 0; | |
| 155 | + return ret; | |
| 156 | +}#<< | |
| 157 | + | |
| 158 | +hasWriteObject_rClass_Z( p0 : JClass) : int | |
| 159 | +{#>> | |
| 160 | + if (jni->GetMethodFlags(p0, "writeObject (Ljava/io/ObjectOutputStream;)V") != 0) | |
| 161 | + return JNI->TRUE; | |
| 162 | + else | |
| 163 | + return JNI->FALSE; | |
| 164 | +}#<< | |
| @@ -0,0 +1,30 @@ | ||
| 1 | +# generated file edit with care | |
| 2 | + | |
| 3 | +ObjectStreamClass_L : module | |
| 4 | +{ | |
| 5 | + ObjectStreamClass_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + name : JString; | |
| 9 | + superclass : ref ObjectStreamClass_obj; | |
| 10 | + serializable : byte; | |
| 11 | + externalizable : byte; | |
| 12 | + fields : JArrayJObject; | |
| 13 | + ofClass : JClass; | |
| 14 | + suid : big; | |
| 15 | + fieldSequence : JArrayI; | |
| 16 | + hasWriteObjectMethod : byte; | |
| 17 | + localClassDesc : ref ObjectStreamClass_obj; | |
| 18 | + }; | |
| 19 | + | |
| 20 | + init : fn( jni_p : JNI ); | |
| 21 | + getClassAccess_rClass_I : fn( p0 : JClass) : int; | |
| 22 | + getMethodSignatures_rClass_aString : fn( p0 : JClass) : JArrayJString; | |
| 23 | + getMethodAccess_rClass_rString_I : fn( p0 : JClass,p1 : JString) : int; | |
| 24 | + getFieldSignatures_rClass_aString : fn( p0 : JClass) : JArrayJString; | |
| 25 | + getFieldAccess_rClass_rString_I : fn( p0 : JClass,p1 : JString) : int; | |
| 26 | + getFields0_rClass_aObjectStreamField : fn( this : ref ObjectStreamClass_obj, p0 : JClass) : JArrayJObject; | |
| 27 | + getSerialVersionUID_rClass_J : fn( p0 : JClass) : big; | |
| 28 | + hasWriteObject_rClass_Z : fn( p0 : JClass) : int; | |
| 29 | + | |
| 30 | +}; | |
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
| @@ -0,0 +1,190 @@ | ||
| 1 | +implement RandomAccessFile_L; | |
| 2 | + | |
| 3 | +# javal v1.3 generated file: edit with care | |
| 4 | + | |
| 5 | +include "jni.m"; | |
| 6 | + jni : JNI; | |
| 7 | + ClassModule, | |
| 8 | + JString, | |
| 9 | + JArray, | |
| 10 | + JArrayI, | |
| 11 | + JArrayC, | |
| 12 | + JArrayB, | |
| 13 | + JArrayS, | |
| 14 | + JArrayJ, | |
| 15 | + JArrayF, | |
| 16 | + JArrayD, | |
| 17 | + JArrayZ, | |
| 18 | + JArrayJObject, | |
| 19 | + JArrayJClass, | |
| 20 | + JArrayJString, | |
| 21 | + JClass, | |
| 22 | + JThread, | |
| 23 | + JObject : import jni; | |
| 24 | + | |
| 25 | +#>> extra pre includes here | |
| 26 | + sys : import jni; | |
| 27 | + FALSE : import jni; | |
| 28 | + TRUE : import jni; | |
| 29 | +include "FileDescriptor_L.m"; | |
| 30 | + FileDescriptor_obj : import FileDescriptor_L; | |
| 31 | +#<< | |
| 32 | + | |
| 33 | +include "RandomAccessFile_L.m"; | |
| 34 | + | |
| 35 | +#>> extra post includes here | |
| 36 | +#<< | |
| 37 | + | |
| 38 | +init( jni_p : JNI ) | |
| 39 | +{ | |
| 40 | + # save java native inteface mod instance | |
| 41 | + jni = jni_p; | |
| 42 | + #>>extra initialization here | |
| 43 | + sys = jni->sys; | |
| 44 | + #<< | |
| 45 | +} | |
| 46 | + | |
| 47 | +open_rString_Z_V( this : ref RandomAccessFile_obj, p0 : JString,p1 : int) | |
| 48 | +{#>> | |
| 49 | + # p0 == file name | |
| 50 | + # p1 == writable flag | |
| 51 | + | |
| 52 | + if ((this.fd == nil) || (p0 == nil) || (p0.str == nil)) | |
| 53 | + jni->ThrowException("java.lang.NullPointerException", "null path name"); | |
| 54 | + | |
| 55 | + if (p1 == TRUE){ | |
| 56 | + this.fd.fd = sys->open(p0.str, sys->ORDWR); | |
| 57 | + if(this.fd.fd == nil) | |
| 58 | + this.fd.fd = sys->create(p0.str, Sys->ORDWR, 8r640); | |
| 59 | + } | |
| 60 | + else | |
| 61 | + this.fd.fd = sys->open(p0.str, sys->OREAD); | |
| 62 | + | |
| 63 | + if(this.fd.fd == nil) | |
| 64 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 65 | +}#<< | |
| 66 | + | |
| 67 | +read_I( this : ref RandomAccessFile_obj) : int | |
| 68 | +{#>> | |
| 69 | + buf := array[1] of byte; | |
| 70 | + | |
| 71 | + if ((this.fd == nil) || (this.fd.fd == nil)) | |
| 72 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 73 | + | |
| 74 | + readin := sys->read(this.fd.fd, buf, 1); | |
| 75 | + if (readin == 0) # EOF | |
| 76 | + return -1; | |
| 77 | + | |
| 78 | + if (readin < 0) | |
| 79 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 80 | + return (int buf[0]); | |
| 81 | +}#<< | |
| 82 | + | |
| 83 | +FD: import Sys; | |
| 84 | +stderr: ref FD; | |
| 85 | +readBytes_aB_I_I_I( this : ref RandomAccessFile_obj, p0 : JArrayB,p1 : int,p2 : int) : int | |
| 86 | +{#>> | |
| 87 | + # p0 == buffer for read in data | |
| 88 | + # p1 == offset in buffer to start to place data | |
| 89 | + # p2 == amount of data to read in | |
| 90 | + | |
| 91 | + if ((this.fd == nil) || (this.fd.fd == nil)) | |
| 92 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 93 | + | |
| 94 | + if ((p0 == nil) || (p0.ary == nil)) | |
| 95 | + jni->ThrowException("java.lang.NullPointerException", "null array"); | |
| 96 | + | |
| 97 | + if ((p1 < 0) || (p1 > len p0.ary)) | |
| 98 | + jni->ThrowException("java.lang.ArrayIndexOutOfBoundsException", nil); | |
| 99 | + | |
| 100 | + if ((p1 + p2) > len p0.ary) | |
| 101 | + p2 = (len p0.ary) - p1; | |
| 102 | + | |
| 103 | + if (p2 <= 0) | |
| 104 | + jni->ThrowException("java.lang.ArrayIndexOutOfBoundsException", | |
| 105 | +nil); | |
| 106 | + | |
| 107 | + n := sys->read(this.fd.fd, p0.ary[p1:len p0.ary], p2); | |
| 108 | + if (n == 0) # EOF | |
| 109 | + return -1; | |
| 110 | + | |
| 111 | + if (n < 0) | |
| 112 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 113 | + return n; | |
| 114 | +}#<< | |
| 115 | + | |
| 116 | +write_I_V( this : ref RandomAccessFile_obj, p0 : int) | |
| 117 | +{#>> | |
| 118 | + c := array[1] of byte; | |
| 119 | + c[0] = byte p0; | |
| 120 | + | |
| 121 | + if ((this.fd == nil) || (this.fd.fd == nil)) | |
| 122 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 123 | + | |
| 124 | + if (sys->write(this.fd.fd, c, 1) != 1) | |
| 125 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 126 | +}#<< | |
| 127 | + | |
| 128 | +writeBytes_aB_I_I_V( this : ref RandomAccessFile_obj, p0 : JArrayB,p1 : int,p2 : int) | |
| 129 | +{#>> | |
| 130 | + # p0 == buffer array to write from | |
| 131 | + # p1 == offset in buffer | |
| 132 | + # p2 == amount to write out | |
| 133 | + | |
| 134 | + if ((this.fd == nil) || (this.fd.fd == nil)) | |
| 135 | + jni->ThrowException("java.lang.NullPointerException", "null FileDescriptor"); | |
| 136 | + if ((p0 == nil) || (p0.ary == nil)) | |
| 137 | + jni->ThrowException("java.lang.NullPointerException", nil); | |
| 138 | + if ((p1 < 0) || (p2 < 0) || (p1 + p2 > (len p0.ary))) | |
| 139 | + jni->ThrowException("java.lang.ArrayIndexOutOfBoundsException", nil); | |
| 140 | + | |
| 141 | + n := 0; | |
| 142 | + while (p2 > 0) { | |
| 143 | + n = sys->write(this.fd.fd, p0.ary[p1:len p0.ary], p2); | |
| 144 | + if (n == -1) { | |
| 145 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 146 | + break; | |
| 147 | + } | |
| 148 | + p1 += n; | |
| 149 | + p2 -= n; | |
| 150 | + } | |
| 151 | +}#<< | |
| 152 | + | |
| 153 | +getFilePointer_J( this : ref RandomAccessFile_obj) : big | |
| 154 | +{#>> | |
| 155 | + if (this.fd == nil) | |
| 156 | + jni->ThrowException("java.io.IOException", "this.fd nil"); | |
| 157 | + cur := sys->seek(this.fd.fd, 0, sys->SEEKRELA); | |
| 158 | + if (cur < 0) | |
| 159 | + jni->ThrowException("java.io.IOException", sys->sprint("%r")); | |
| 160 | + return (big cur); | |
| 161 | +}#<< | |
| 162 | + | |
| 163 | +seek_J_V( this : ref RandomAccessFile_obj, p0 : big) | |
| 164 | +{#>> | |
| 165 | + if (this.fd == nil) | |
| 166 | + jni->ThrowException("java.io.IOException", "this.fd nil"); | |
| 167 | + sys->seek(this.fd.fd, (int p0), sys->SEEKSTART); | |
| 168 | +}#<< | |
| 169 | + | |
| 170 | +length_J( this : ref RandomAccessFile_obj) : big | |
| 171 | +{#>> | |
| 172 | + if (this.fd == nil) | |
| 173 | + jni->ThrowException("java.io.IOException", "this.fd nil"); | |
| 174 | + cur := sys->seek(this.fd.fd, 0, sys->SEEKRELA); | |
| 175 | + end := sys->seek(this.fd.fd, 0, sys->SEEKEND); | |
| 176 | + sys->seek(this.fd.fd, cur, sys->SEEKSTART); | |
| 177 | + | |
| 178 | + return (big end); | |
| 179 | +}#<< | |
| 180 | + | |
| 181 | +close_V( this : ref RandomAccessFile_obj) | |
| 182 | +{#>> | |
| 183 | + if (this.fd != nil) | |
| 184 | + this.fd.fd = nil; | |
| 185 | +}#<< | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| @@ -0,0 +1,22 @@ | ||
| 1 | +# javal v1.3 generated file: edit with care | |
| 2 | + | |
| 3 | +RandomAccessFile_L : module | |
| 4 | +{ | |
| 5 | + RandomAccessFile_obj : adt | |
| 6 | + { | |
| 7 | + cl_mod : ClassModule; | |
| 8 | + fd : ref FileDescriptor_obj; | |
| 9 | + }; | |
| 10 | + | |
| 11 | + init : fn( jni_p : JNI ); | |
| 12 | + open_rString_Z_V : fn( this : ref RandomAccessFile_obj, p0 : JString,p1 : int); | |
| 13 | + read_I : fn( this : ref RandomAccessFile_obj) : int; | |
| 14 | + readBytes_aB_I_I_I : fn( this : ref RandomAccessFile_obj, p0 : JArrayB,p1 : int,p2 : int) : int; | |
| 15 | + write_I_V : fn( this : ref RandomAccessFile_obj, p0 : int); | |
| 16 | + writeBytes_aB_I_I_V : fn( this : ref RandomAccessFile_obj, p0 : JArrayB,p1 : int,p2 : int); | |
| 17 | + getFilePointer_J : fn( this : ref RandomAccessFile_obj) : big; | |
| 18 | + seek_J_V : fn( this : ref RandomAccessFile_obj, p0 : big); | |
| 19 | + length_J : fn( this : ref RandomAccessFile_obj) : big; | |
| 20 | + close_V : fn( this : ref RandomAccessFile_obj); | |
| 21 | + | |
| 22 | +}; | |
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
Empty file added.
| @@ -0,0 +1,150 @@ | ||
| 1 | +<../../../../mkconfig | |
| 2 | + | |
| 3 | +TARG=\ | |
| 4 | + BufferedInputStream.dis\ | |
| 5 | + BufferedOutputStream.dis\ | |
| 6 | + BufferedReader.dis\ | |
| 7 | + BufferedWriter.dis\ | |
| 8 | + ByteArrayInputStream.dis\ | |
| 9 | + ByteArrayOutputStream.dis\ | |
| 10 | + CharArrayReader.dis\ | |
| 11 | + CharArrayWriter.dis\ | |
| 12 | +# for CharConversionException.dis\ | |
| 13 | + oF8WXXue0VYZof82fzj4L.dis\ | |
| 14 | + DataInput.dis\ | |
| 15 | + DataInputStream.dis\ | |
| 16 | + DataOutput.dis\ | |
| 17 | + DataOutputStream.dis\ | |
| 18 | + EOFException.dis\ | |
| 19 | + Externalizable.dis\ | |
| 20 | + File.dis\ | |
| 21 | + FileDescriptor.dis\ | |
| 22 | + FileInputStream.dis\ | |
| 23 | + FileNotFoundException.dis\ | |
| 24 | + FileOutputStream.dis\ | |
| 25 | + FileReader.dis\ | |
| 26 | + FileWriter.dis\ | |
| 27 | + FilenameFilter.dis\ | |
| 28 | + FilterInputStream.dis\ | |
| 29 | + FilterOutputStream.dis\ | |
| 30 | + FilterReader.dis\ | |
| 31 | + FilterWriter.dis\ | |
| 32 | + IOException.dis\ | |
| 33 | + InputStream.dis\ | |
| 34 | + InputStreamReader.dis\ | |
| 35 | +# for InterruptedIOException.dis\ | |
| 36 | + Udmf2Su14O7L1V-QzaTq3.dis\ | |
| 37 | + InvalidClassException.dis\ | |
| 38 | +# for InvalidObjectException.dis\ | |
| 39 | + PjqhaWOg4nDK5hla7XFmv.dis\ | |
| 40 | + LineNumberInputStream.dis\ | |
| 41 | + LineNumberReader.dis\ | |
| 42 | + NotActiveException.dis\ | |
| 43 | +# for NotSerializableException.dis\ | |
| 44 | + YBCI4zMUNV+Uc45idEPcv.dis\ | |
| 45 | + ObjectInput.dis\ | |
| 46 | + ObjectInputStream.dis\ | |
| 47 | + ObjectInputValidation.dis\ | |
| 48 | + ObjectOutput.dis\ | |
| 49 | + ObjectOutputStream.dis\ | |
| 50 | + ObjectStreamClass.dis\ | |
| 51 | +# for ObjectStreamClassEntry.dis\ | |
| 52 | + 6T1LdH4wdbOUJeqUfASeI.dis\ | |
| 53 | + ObjectStreamConstants.dis\ | |
| 54 | + ObjectStreamException.dis\ | |
| 55 | + ObjectStreamField.dis\ | |
| 56 | + OptionalDataException.dis\ | |
| 57 | + OutputStream.dis\ | |
| 58 | + OutputStreamWriter.dis\ | |
| 59 | + PipedInputStream.dis\ | |
| 60 | + PipedOutputStream.dis\ | |
| 61 | + PipedReader.dis\ | |
| 62 | + PipedWriter.dis\ | |
| 63 | + PrintStream.dis\ | |
| 64 | + PrintWriter.dis\ | |
| 65 | + PushbackInputStream.dis\ | |
| 66 | + PushbackReader.dis\ | |
| 67 | + RandomAccessFile.dis\ | |
| 68 | + Reader.dis\ | |
| 69 | + SequenceInputStream.dis\ | |
| 70 | + Serializable.dis\ | |
| 71 | +# for StreamCorruptedException.dis\ | |
| 72 | + 7Ev9-si8zsgglOEBSxbM3.dis\ | |
| 73 | + StreamTokenizer.dis\ | |
| 74 | +# for StringBufferInputStream.dis\ | |
| 75 | + O+cE9tcuJ1-znyckKtvEt.dis\ | |
| 76 | + StringReader.dis\ | |
| 77 | + StringWriter.dis\ | |
| 78 | + SyncFailedException.dis\ | |
| 79 | +# for UTFDataFormatException.dis\ | |
| 80 | + VgQ9w-N7w2YXJglmrtjzJ.dis\ | |
| 81 | +# for UnsupportedEncodingException.dis\ | |
| 82 | + 34nQVDtVtK+3NDDpbkN7j.dis\ | |
| 83 | + ValidationCallback.dis\ | |
| 84 | + WriteAbortedException.dis\ | |
| 85 | + Writer.dis\ | |
| 86 | +# Limbo code\ | |
| 87 | + FileDescriptor_L.dis\ | |
| 88 | + FileInputStream_L.dis\ | |
| 89 | + FileOutputStream_L.dis\ | |
| 90 | + File_L.dis\ | |
| 91 | + ObjectInputStream_L.dis\ | |
| 92 | + ObjectOutputStream_L.dis\ | |
| 93 | + ObjectStreamClass_L.dis\ | |
| 94 | + RandomAccessFile_L.dis\ | |
| 95 | + | |
| 96 | +MODULES=\ | |
| 97 | + $ROOT/java/module/classloader.m\ | |
| 98 | + $ROOT/java/module/jni.m\ | |
| 99 | + $ROOT/java/module/cast.m\ | |
| 100 | + FileDescriptor_L.m\ | |
| 101 | + FileInputStream_L.m\ | |
| 102 | + FileOutputStream_L.m\ | |
| 103 | + File_L.m\ | |
| 104 | + ObjectInputStream_L.m\ | |
| 105 | + ObjectOutputStream_L.m\ | |
| 106 | + ObjectStreamClass_L.m\ | |
| 107 | + RandomAccessFile_L.m\ | |
| 108 | + | |
| 109 | +SYSMODULES=\ | |
| 110 | + draw.m\ | |
| 111 | + hash.m\ | |
| 112 | + keyring.m\ | |
| 113 | + loader.m\ | |
| 114 | + math.m\ | |
| 115 | + string.m\ | |
| 116 | + sys.m\ | |
| 117 | + | |
| 118 | +DISBIN=$ROOT/java/dis/java/java/io | |
| 119 | + | |
| 120 | +<$ROOT/mkfiles/mkjava | |
| 121 | + | |
| 122 | +oF8WXXue0VYZof82fzj4L.dis: CharConversionException.class | |
| 123 | + j2d CharConversionException.class | |
| 124 | + | |
| 125 | +Udmf2Su14O7L1V-QzaTq3.dis: InterruptedIOException.class | |
| 126 | + j2d InterruptedIOException.class | |
| 127 | + | |
| 128 | +PjqhaWOg4nDK5hla7XFmv.dis: InvalidObjectException.class | |
| 129 | + j2d InvalidObjectException.class | |
| 130 | + | |
| 131 | +YBCI4zMUNV+Uc45idEPcv.dis: NotSerializableException.class | |
| 132 | + j2d NotSerializableException.class | |
| 133 | + | |
| 134 | +6T1LdH4wdbOUJeqUfASeI.dis: ObjectStreamClass.class | |
| 135 | + j2d ObjectStreamClassEntry.class | |
| 136 | + | |
| 137 | +7Ev9-si8zsgglOEBSxbM3.dis: StreamCorruptedException.class | |
| 138 | + j2d StreamCorruptedException.class | |
| 139 | + | |
| 140 | +O+cE9tcuJ1-znyckKtvEt.dis: StringBufferInputStream.class | |
| 141 | + j2d StringBufferInputStream.class | |
| 142 | + | |
| 143 | +VgQ9w-N7w2YXJglmrtjzJ.dis: UTFDataFormatException.class | |
| 144 | + j2d UTFDataFormatException.class | |
| 145 | + | |
| 146 | +34nQVDtVtK+3NDDpbkN7j.dis: UnsupportedEncodingException.class | |
| 147 | + j2d UnsupportedEncodingException.class | |
| 148 | + | |
| 149 | +ValidationCallback.dis: ObjectInputStream.class | |
| 150 | + j2d ValidationCallback.class | |