-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlob.swift
More file actions
231 lines (161 loc) · 9.97 KB
/
Blob.swift
File metadata and controls
231 lines (161 loc) · 9.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
import java_swift
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// interface java.sql.Blob ///
public protocol Blob: JavaProtocol {
/// public abstract void java.sql.Blob.free() throws java.sql.SQLException
func free() throws /* java.sql.SQLException */
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
// Skipping method: false false true false false
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream() throws java.sql.SQLException
// Skipping method: false false true false false
/// public abstract byte[] java.sql.Blob.getBytes(long,int) throws java.sql.SQLException
func getBytes( pos: Int64, length: Int ) throws /* java.sql.SQLException */ -> [Int8]!
/// public abstract long java.sql.Blob.length() throws java.sql.SQLException
func length() throws /* java.sql.SQLException */ -> Int64
/// public abstract long java.sql.Blob.position(java.sql.Blob,long) throws java.sql.SQLException
func position( pattern: Blob?, start: Int64 ) throws /* java.sql.SQLException */ -> Int64
/// public abstract long java.sql.Blob.position(byte[],long) throws java.sql.SQLException
func position( pattern: [Int8]?, start: Int64 ) throws /* java.sql.SQLException */ -> Int64
/// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long) throws java.sql.SQLException
// Skipping method: false false true false false
/// public abstract int java.sql.Blob.setBytes(long,byte[]) throws java.sql.SQLException
func setBytes( pos: Int64, bytes: [Int8]? ) throws /* java.sql.SQLException */ -> Int
/// public abstract int java.sql.Blob.setBytes(long,byte[],int,int) throws java.sql.SQLException
func setBytes( pos: Int64, bytes: [Int8]?, offset: Int, len: Int ) throws /* java.sql.SQLException */ -> Int
/// public abstract void java.sql.Blob.truncate(long) throws java.sql.SQLException
func truncate( len: Int64 ) throws /* java.sql.SQLException */
}
open class BlobForward: JNIObjectForward, Blob {
private static var BlobJNIClass: jclass?
/// public abstract void java.sql.Blob.free() throws java.sql.SQLException
private static var free_MethodID_9: jmethodID?
open func free() throws /* java.sql.SQLException */ {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "free", methodSig: "()V", methodCache: &BlobForward.free_MethodID_9, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
}
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
// Skipping method: false false true false false
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream() throws java.sql.SQLException
// Skipping method: false false true false false
/// public abstract byte[] java.sql.Blob.getBytes(long,int) throws java.sql.SQLException
private static var getBytes_MethodID_10: jmethodID?
open func getBytes( pos: Int64, length: Int ) throws /* java.sql.SQLException */ -> [Int8]! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( j: pos )
__args[1] = jvalue( i: jint(length) )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getBytes", methodSig: "(JI)[B", methodCache: &BlobForward.getBytes_MethodID_10, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: [Int8].self, from: __return )
}
open func getBytes( _ _pos: Int64, _ _length: Int ) throws /* java.sql.SQLException */ -> [Int8]! {
return try getBytes( pos: _pos, length: _length )
}
/// public abstract long java.sql.Blob.length() throws java.sql.SQLException
private static var length_MethodID_11: jmethodID?
open func length() throws /* java.sql.SQLException */ -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "length", methodSig: "()J", methodCache: &BlobForward.length_MethodID_11, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
return __return
}
/// public abstract long java.sql.Blob.position(java.sql.Blob,long) throws java.sql.SQLException
private static var position_MethodID_12: jmethodID?
open func position( pattern: Blob?, start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = JNIType.toJava( value: pattern, locals: &__locals )
__args[1] = jvalue( j: start )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "position", methodSig: "(Ljava/sql/Blob;J)J", methodCache: &BlobForward.position_MethodID_12, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
return __return
}
open func position( _ _pattern: Blob?, _ _start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
return try position( pattern: _pattern, start: _start )
}
/// public abstract long java.sql.Blob.position(byte[],long) throws java.sql.SQLException
private static var position_MethodID_13: jmethodID?
open func position( pattern: [Int8]?, start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = JNIType.toJava( value: pattern, locals: &__locals )
__args[1] = jvalue( j: start )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "position", methodSig: "([BJ)J", methodCache: &BlobForward.position_MethodID_13, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
return __return
}
open func position( _ _pattern: [Int8]?, _ _start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
return try position( pattern: _pattern, start: _start )
}
/// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long) throws java.sql.SQLException
// Skipping method: false false true false false
/// public abstract int java.sql.Blob.setBytes(long,byte[]) throws java.sql.SQLException
private static var setBytes_MethodID_14: jmethodID?
open func setBytes( pos: Int64, bytes: [Int8]? ) throws /* java.sql.SQLException */ -> Int {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( j: pos )
__args[1] = JNIType.toJava( value: bytes, locals: &__locals )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "setBytes", methodSig: "(J[B)I", methodCache: &BlobForward.setBytes_MethodID_14, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
return Int(__return)
}
open func setBytes( _ _pos: Int64, _ _bytes: [Int8]? ) throws /* java.sql.SQLException */ -> Int {
return try setBytes( pos: _pos, bytes: _bytes )
}
/// public abstract int java.sql.Blob.setBytes(long,byte[],int,int) throws java.sql.SQLException
private static var setBytes_MethodID_15: jmethodID?
open func setBytes( pos: Int64, bytes: [Int8]?, offset: Int, len: Int ) throws /* java.sql.SQLException */ -> Int {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 4 )
__args[0] = jvalue( j: pos )
__args[1] = JNIType.toJava( value: bytes, locals: &__locals )
__args[2] = jvalue( i: jint(offset) )
__args[3] = jvalue( i: jint(len) )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "setBytes", methodSig: "(J[BII)I", methodCache: &BlobForward.setBytes_MethodID_15, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
return Int(__return)
}
open func setBytes( _ _pos: Int64, _ _bytes: [Int8]?, _ _offset: Int, _ _len: Int ) throws /* java.sql.SQLException */ -> Int {
return try setBytes( pos: _pos, bytes: _bytes, offset: _offset, len: _len )
}
/// public abstract void java.sql.Blob.truncate(long) throws java.sql.SQLException
private static var truncate_MethodID_16: jmethodID?
open func truncate( len: Int64 ) throws /* java.sql.SQLException */ {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( j: len )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "truncate", methodSig: "(J)V", methodCache: &BlobForward.truncate_MethodID_16, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw SQLException( javaObject: throwable )
}
}
open func truncate( _ _len: Int64 ) throws /* java.sql.SQLException */ {
try truncate( len: _len )
}
}