@@ -3,9 +3,6 @@ import java_swift
33
44/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
55
6- /// JAVA_HOME: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home ///
7- /// Tue Dec 20 11:30:32 GMT 2016 ///
8-
96/// interface java.sql.Blob ///
107
118public protocol Blob : JavaProtocol {
@@ -16,46 +13,41 @@ public protocol Blob: JavaProtocol {
1613
1714 /// public abstract byte[] java.sql.Blob.getBytes(long,int) throws java.sql.SQLException
1815
19- func getBytes( arg0: Int64 , arg1: Int ) throws /* java.sql.SQLException */ -> [ Int8 ] !
20- func getBytes( _ _arg0: Int64 , _ _arg1: Int ) throws /* java.sql.SQLException */ -> [ Int8 ] !
16+ func getBytes( pos: Int64 , length: Int ) throws /* java.sql.SQLException */ -> [ Int8 ] !
2117
2218 /// public abstract long java.sql.Blob.position(byte[],long) throws java.sql.SQLException
2319
24- func position( arg0: [ Int8 ] ? , arg1: Int64 ) throws /* java.sql.SQLException */ -> Int64
25- func position( _ _arg0: [ Int8 ] ? , _ _arg1: Int64 ) throws /* java.sql.SQLException */ -> Int64
20+ func position( pattern: [ Int8 ] ? , start: Int64 ) throws /* java.sql.SQLException */ -> Int64
2621
2722 /// public abstract long java.sql.Blob.position(java.sql.Blob,long) throws java.sql.SQLException
2823
29- func position( arg0: Blob ? , arg1: Int64 ) throws /* java.sql.SQLException */ -> Int64
30- func position( _ _arg0: Blob ? , _ _arg1: Int64 ) throws /* java.sql.SQLException */ -> Int64
24+ func position( pattern: Blob ? , start: Int64 ) throws /* java.sql.SQLException */ -> Int64
3125
3226 /// public abstract void java.sql.Blob.truncate(long) throws java.sql.SQLException
3327
34- func truncate( arg0: Int64 ) throws /* java.sql.SQLException */
35- func truncate( _ _arg0: Int64 ) throws /* java.sql.SQLException */
28+ func truncate( len: Int64 ) throws /* java.sql.SQLException */
3629
37- /// public abstract void java.sql.Blob.free( ) throws java.sql.SQLException
30+ /// public abstract int java.sql.Blob.setBytes(long,byte[],int,int ) throws java.sql.SQLException
3831
39- func free ( ) throws /* java.sql.SQLException */
32+ func setBytes ( pos : Int64 , bytes : [ Int8 ] ? , offset : Int , len : Int ) throws /* java.sql.SQLException */ -> Int
4033
41- /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream (long,long ) throws java.sql.SQLException
34+ /// public abstract int java.sql.Blob.setBytes (long,byte[] ) throws java.sql.SQLException
4235
43- /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream( ) throws java.sql.SQLException
36+ func setBytes ( pos : Int64 , bytes : [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int
4437
45- /// public abstract int java.sql.Blob.setBytes (long,byte[],int,int ) throws java.sql.SQLException
38+ /// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream (long) throws java.sql.SQLException
4639
47- func setBytes( arg0: Int64 , arg1: [ Int8 ] ? , arg2: Int , arg3: Int ) throws /* java.sql.SQLException */ -> Int
48- func setBytes( _ _arg0: Int64 , _ _arg1: [ Int8 ] ? , _ _arg2: Int , _ _arg3: Int ) throws /* java.sql.SQLException */ -> Int
40+ /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
4941
50- /// public abstract int java.sql.Blob.setBytes(long,byte[] ) throws java.sql.SQLException
42+ /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream( ) throws java.sql.SQLException
5143
52- func setBytes( arg0: Int64 , arg1: [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int
53- func setBytes( _ _arg0: Int64 , _ _arg1: [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int
44+ /// public abstract void java.sql.Blob.free() throws java.sql.SQLException
5445
55- /// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long ) throws java.sql.SQLException
46+ func free ( ) throws /* java.sql.SQLException */
5647
5748}
5849
50+
5951open class BlobForward : JNIObjectForward , Blob {
6052
6153 private static var BlobJNIClass : jclass ?
@@ -71,149 +63,149 @@ open class BlobForward: JNIObjectForward, Blob {
7163 if let throwable = JNI . ExceptionCheck ( ) {
7264 throw SQLException ( javaObject: throwable )
7365 }
74- return JNIType . decode ( type: Int64 ( ) , from: __return )
66+ return JNIType . toSwift ( type: Int64 ( ) , from: __return )
7567 }
7668
7769
7870 /// public abstract byte[] java.sql.Blob.getBytes(long,int) throws java.sql.SQLException
7971
8072 private static var getBytes_MethodID_10 : jmethodID ?
8173
82- open func getBytes( arg0 : Int64 , arg1 : Int ) throws /* java.sql.SQLException */ -> [ Int8 ] ! {
74+ open func getBytes( pos : Int64 , length : Int ) throws /* java.sql.SQLException */ -> [ Int8 ] ! {
8375 var __args = [ jvalue] ( repeating: jvalue ( ) , count: 2 )
8476 var __locals = [ jobject] ( )
85- __args [ 0 ] = JNIType . encode ( value: arg0 , locals: & __locals )
86- __args [ 1 ] = JNIType . encode ( value: arg1 , locals: & __locals )
77+ __args [ 0 ] = JNIType . toJava ( value: pos , locals: & __locals )
78+ __args [ 1 ] = JNIType . toJava ( value: length , locals: & __locals )
8779 let __return = JNIMethod . CallObjectMethod ( object: javaObject, methodName: " getBytes " , methodSig: " (JI)[B " , methodCache: & BlobForward. getBytes_MethodID_10, args: & __args, locals: & __locals )
8880 if let throwable = JNI . ExceptionCheck ( ) {
8981 throw SQLException ( javaObject: throwable )
9082 }
91- return JNIType . decode ( type: [ Int8] ( ) , from: __return )
83+ return JNIType . toSwift ( type: [ Int8] ( ) , from: __return )
9284 }
9385
94- open func getBytes( _ _arg0 : Int64 , _ _arg1 : Int ) throws /* java.sql.SQLException */ -> [ Int8 ] ! {
95- return try getBytes ( arg0 : _arg0 , arg1 : _arg1 )
86+ open func getBytes( _ _pos : Int64 , _ _length : Int ) throws /* java.sql.SQLException */ -> [ Int8 ] ! {
87+ return try getBytes ( pos : _pos , length : _length )
9688 }
9789
9890 /// public abstract long java.sql.Blob.position(byte[],long) throws java.sql.SQLException
9991
10092 private static var position_MethodID_11 : jmethodID ?
10193
102- open func position( arg0 : [ Int8 ] ? , arg1 : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
94+ open func position( pattern : [ Int8 ] ? , start : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
10395 var __args = [ jvalue] ( repeating: jvalue ( ) , count: 2 )
10496 var __locals = [ jobject] ( )
105- __args [ 0 ] = JNIType . encode ( value: arg0 , locals: & __locals )
106- __args [ 1 ] = JNIType . encode ( value: arg1 , locals: & __locals )
97+ __args [ 0 ] = JNIType . toJava ( value: pattern , locals: & __locals )
98+ __args [ 1 ] = JNIType . toJava ( value: start , locals: & __locals )
10799 let __return = JNIMethod . CallLongMethod ( object: javaObject, methodName: " position " , methodSig: " ([BJ)J " , methodCache: & BlobForward. position_MethodID_11, args: & __args, locals: & __locals )
108100 if let throwable = JNI . ExceptionCheck ( ) {
109101 throw SQLException ( javaObject: throwable )
110102 }
111- return JNIType . decode ( type: Int64 ( ) , from: __return )
103+ return JNIType . toSwift ( type: Int64 ( ) , from: __return )
112104 }
113105
114- open func position( _ _arg0 : [ Int8 ] ? , _ _arg1 : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
115- return try position ( arg0 : _arg0 , arg1 : _arg1 )
106+ open func position( _ _pattern : [ Int8 ] ? , _ _start : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
107+ return try position ( pattern : _pattern , start : _start )
116108 }
117109
118110 /// public abstract long java.sql.Blob.position(java.sql.Blob,long) throws java.sql.SQLException
119111
120112 private static var position_MethodID_12 : jmethodID ?
121113
122- open func position( arg0 : Blob ? , arg1 : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
114+ open func position( pattern : Blob ? , start : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
123115 var __args = [ jvalue] ( repeating: jvalue ( ) , count: 2 )
124116 var __locals = [ jobject] ( )
125- __args [ 0 ] = jvalue ( l : arg0 ? . localJavaObject ( & __locals ) )
126- __args [ 1 ] = JNIType . encode ( value: arg1 , locals: & __locals )
117+ __args [ 0 ] = JNIType . toJava ( value : pattern , locals : & __locals )
118+ __args [ 1 ] = JNIType . toJava ( value: start , locals: & __locals )
127119 let __return = JNIMethod . CallLongMethod ( object: javaObject, methodName: " position " , methodSig: " (Ljava/sql/Blob;J)J " , methodCache: & BlobForward. position_MethodID_12, args: & __args, locals: & __locals )
128120 if let throwable = JNI . ExceptionCheck ( ) {
129121 throw SQLException ( javaObject: throwable )
130122 }
131- return JNIType . decode ( type: Int64 ( ) , from: __return )
123+ return JNIType . toSwift ( type: Int64 ( ) , from: __return )
132124 }
133125
134- open func position( _ _arg0 : Blob ? , _ _arg1 : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
135- return try position ( arg0 : _arg0 , arg1 : _arg1 )
126+ open func position( _ _pattern : Blob ? , _ _start : Int64 ) throws /* java.sql.SQLException */ -> Int64 {
127+ return try position ( pattern : _pattern , start : _start )
136128 }
137129
138130 /// public abstract void java.sql.Blob.truncate(long) throws java.sql.SQLException
139131
140132 private static var truncate_MethodID_13 : jmethodID ?
141133
142- open func truncate( arg0 : Int64 ) throws /* java.sql.SQLException */ {
134+ open func truncate( len : Int64 ) throws /* java.sql.SQLException */ {
143135 var __args = [ jvalue] ( repeating: jvalue ( ) , count: 1 )
144136 var __locals = [ jobject] ( )
145- __args [ 0 ] = JNIType . encode ( value: arg0 , locals: & __locals )
137+ __args [ 0 ] = JNIType . toJava ( value: len , locals: & __locals )
146138 JNIMethod . CallVoidMethod ( object: javaObject, methodName: " truncate " , methodSig: " (J)V " , methodCache: & BlobForward. truncate_MethodID_13, args: & __args, locals: & __locals )
147139 if let throwable = JNI . ExceptionCheck ( ) {
148140 throw SQLException ( javaObject: throwable )
149141 }
150142 }
151143
152- open func truncate( _ _arg0 : Int64 ) throws /* java.sql.SQLException */ {
153- try truncate ( arg0 : _arg0 )
144+ open func truncate( _ _len : Int64 ) throws /* java.sql.SQLException */ {
145+ try truncate ( len : _len )
154146 }
155147
156- /// public abstract void java.sql.Blob.free( ) throws java.sql.SQLException
148+ /// public abstract int java.sql.Blob.setBytes(long,byte[],int,int ) throws java.sql.SQLException
157149
158- private static var free_MethodID_14 : jmethodID ?
150+ private static var setBytes_MethodID_14 : jmethodID ?
159151
160- open func free ( ) throws /* java.sql.SQLException */ {
161- var __args = [ jvalue] ( repeating: jvalue ( ) , count: 1 )
152+ open func setBytes ( pos : Int64 , bytes : [ Int8 ] ? , offset : Int , len : Int ) throws /* java.sql.SQLException */ -> Int {
153+ var __args = [ jvalue] ( repeating: jvalue ( ) , count: 4 )
162154 var __locals = [ jobject] ( )
163- JNIMethod . CallVoidMethod ( object: javaObject, methodName: " free " , methodSig: " ()V " , methodCache: & BlobForward. free_MethodID_14, args: & __args, locals: & __locals )
155+ __args [ 0 ] = JNIType . toJava ( value: pos, locals: & __locals )
156+ __args [ 1 ] = JNIType . toJava ( value: bytes, locals: & __locals )
157+ __args [ 2 ] = JNIType . toJava ( value: offset, locals: & __locals )
158+ __args [ 3 ] = JNIType . toJava ( value: len, locals: & __locals )
159+ let __return = JNIMethod . CallIntMethod ( object: javaObject, methodName: " setBytes " , methodSig: " (J[BII)I " , methodCache: & BlobForward. setBytes_MethodID_14, args: & __args, locals: & __locals )
164160 if let throwable = JNI . ExceptionCheck ( ) {
165161 throw SQLException ( javaObject: throwable )
166162 }
163+ return JNIType . toSwift ( type: Int ( ) , from: __return )
167164 }
168165
166+ open func setBytes( _ _pos: Int64 , _ _bytes: [ Int8 ] ? , _ _offset: Int , _ _len: Int ) throws /* java.sql.SQLException */ -> Int {
167+ return try setBytes ( pos: _pos, bytes: _bytes, offset: _offset, len: _len )
168+ }
169169
170- /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
171-
172- /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream() throws java.sql.SQLException
173-
174- /// public abstract int java.sql.Blob.setBytes(long,byte[],int,int) throws java.sql.SQLException
170+ /// public abstract int java.sql.Blob.setBytes(long,byte[]) throws java.sql.SQLException
175171
176172 private static var setBytes_MethodID_15 : jmethodID ?
177173
178- open func setBytes( arg0 : Int64 , arg1 : [ Int8 ] ? , arg2 : Int , arg3 : Int ) throws /* java.sql.SQLException */ -> Int {
179- var __args = [ jvalue] ( repeating: jvalue ( ) , count: 4 )
174+ open func setBytes( pos : Int64 , bytes : [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int {
175+ var __args = [ jvalue] ( repeating: jvalue ( ) , count: 2 )
180176 var __locals = [ jobject] ( )
181- __args [ 0 ] = JNIType . encode ( value: arg0, locals: & __locals )
182- __args [ 1 ] = JNIType . encode ( value: arg1, locals: & __locals )
183- __args [ 2 ] = JNIType . encode ( value: arg2, locals: & __locals )
184- __args [ 3 ] = JNIType . encode ( value: arg3, locals: & __locals )
185- let __return = JNIMethod . CallIntMethod ( object: javaObject, methodName: " setBytes " , methodSig: " (J[BII)I " , methodCache: & BlobForward. setBytes_MethodID_15, args: & __args, locals: & __locals )
177+ __args [ 0 ] = JNIType . toJava ( value: pos, locals: & __locals )
178+ __args [ 1 ] = JNIType . toJava ( value: bytes, locals: & __locals )
179+ let __return = JNIMethod . CallIntMethod ( object: javaObject, methodName: " setBytes " , methodSig: " (J[B)I " , methodCache: & BlobForward. setBytes_MethodID_15, args: & __args, locals: & __locals )
186180 if let throwable = JNI . ExceptionCheck ( ) {
187181 throw SQLException ( javaObject: throwable )
188182 }
189- return JNIType . decode ( type: Int ( ) , from: __return )
183+ return JNIType . toSwift ( type: Int ( ) , from: __return )
190184 }
191185
192- open func setBytes( _ _arg0 : Int64 , _ _arg1 : [ Int8 ] ? , _ _arg2 : Int , _ _arg3 : Int ) throws /* java.sql.SQLException */ -> Int {
193- return try setBytes ( arg0 : _arg0 , arg1 : _arg1 , arg2 : _arg2 , arg3 : _arg3 )
186+ open func setBytes( _ _pos : Int64 , _ _bytes : [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int {
187+ return try setBytes ( pos : _pos , bytes : _bytes )
194188 }
195189
196- /// public abstract int java.sql.Blob.setBytes(long,byte[]) throws java.sql.SQLException
190+ /// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long) throws java.sql.SQLException
191+
192+ /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
197193
198- private static var setBytes_MethodID_16 : jmethodID ?
194+ /// public abstract java.io.InputStream java.sql.Blob.getBinaryStream() throws java.sql.SQLException
199195
200- open func setBytes( arg0: Int64 , arg1: [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int {
201- var __args = [ jvalue] ( repeating: jvalue ( ) , count: 2 )
196+ /// public abstract void java.sql.Blob.free() throws java.sql.SQLException
197+
198+ private static var free_MethodID_16 : jmethodID ?
199+
200+ open func free( ) throws /* java.sql.SQLException */ {
201+ var __args = [ jvalue] ( repeating: jvalue ( ) , count: 1 )
202202 var __locals = [ jobject] ( )
203- __args [ 0 ] = JNIType . encode ( value: arg0, locals: & __locals )
204- __args [ 1 ] = JNIType . encode ( value: arg1, locals: & __locals )
205- let __return = JNIMethod . CallIntMethod ( object: javaObject, methodName: " setBytes " , methodSig: " (J[B)I " , methodCache: & BlobForward. setBytes_MethodID_16, args: & __args, locals: & __locals )
203+ JNIMethod . CallVoidMethod ( object: javaObject, methodName: " free " , methodSig: " ()V " , methodCache: & BlobForward. free_MethodID_16, args: & __args, locals: & __locals )
206204 if let throwable = JNI . ExceptionCheck ( ) {
207205 throw SQLException ( javaObject: throwable )
208206 }
209- return JNIType . decode ( type: Int ( ) , from: __return )
210207 }
211208
212- open func setBytes( _ _arg0: Int64 , _ _arg1: [ Int8 ] ? ) throws /* java.sql.SQLException */ -> Int {
213- return try setBytes ( arg0: _arg0, arg1: _arg1 )
214- }
215-
216- /// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long) throws java.sql.SQLException
217209
218210}
219211
0 commit comments