-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlob.swift
More file actions
212 lines (147 loc) · 9.66 KB
/
Blob.swift
File metadata and controls
212 lines (147 loc) · 9.66 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
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 long java.sql.Blob.length() throws java.sql.SQLException
func length() throws /* java.sql.SQLException */ -> Int64
/// 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.position(byte[],long) throws java.sql.SQLException
func position( pattern: [Int8]?, start: Int64 ) 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 void java.sql.Blob.truncate(long) throws java.sql.SQLException
func truncate( len: Int64 ) throws /* java.sql.SQLException */
/// 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 int java.sql.Blob.setBytes(long,byte[]) throws java.sql.SQLException
func setBytes( pos: Int64, bytes: [Int8]? ) throws /* java.sql.SQLException */ -> Int
/// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long) throws java.sql.SQLException
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream() throws java.sql.SQLException
/// public abstract void java.sql.Blob.free() throws java.sql.SQLException
func free() throws /* java.sql.SQLException */
}
open class BlobForward: JNIObjectForward, Blob {
private static var BlobJNIClass: jclass?
/// public abstract long java.sql.Blob.length() throws java.sql.SQLException
private static var length_MethodID_9: jmethodID?
open func length() throws /* java.sql.SQLException */ -> Int64 {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "length", methodSig: "()J", methodCache: &BlobForward.length_MethodID_9, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: Int64(), from: __return )
}
/// 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 __args = [jvalue]( repeating: jvalue(), count: 2 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: pos, locals: &__locals )
__args[1] = JNIType.toJava( value: length, locals: &__locals )
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() {
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: [Int8](), 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.position(byte[],long) throws java.sql.SQLException
private static var position_MethodID_11: jmethodID?
open func position( pattern: [Int8]?, start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
var __args = [jvalue]( repeating: jvalue(), count: 2 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: pattern, locals: &__locals )
__args[1] = JNIType.toJava( value: start, locals: &__locals )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "position", methodSig: "([BJ)J", methodCache: &BlobForward.position_MethodID_11, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: Int64(), from: __return )
}
open func position( _ _pattern: [Int8]?, _ _start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
return try position( pattern: _pattern, start: _start )
}
/// 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 __args = [jvalue]( repeating: jvalue(), count: 2 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: pattern, locals: &__locals )
__args[1] = JNIType.toJava( value: start, locals: &__locals )
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() {
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: Int64(), from: __return )
}
open func position( _ _pattern: Blob?, _ _start: Int64 ) throws /* java.sql.SQLException */ -> Int64 {
return try position( pattern: _pattern, start: _start )
}
/// public abstract void java.sql.Blob.truncate(long) throws java.sql.SQLException
private static var truncate_MethodID_13: jmethodID?
open func truncate( len: Int64 ) throws /* java.sql.SQLException */ {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: len, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "truncate", methodSig: "(J)V", methodCache: &BlobForward.truncate_MethodID_13, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
throw SQLException( javaObject: throwable )
}
}
open func truncate( _ _len: Int64 ) throws /* java.sql.SQLException */ {
try truncate( len: _len )
}
/// public abstract int java.sql.Blob.setBytes(long,byte[],int,int) throws java.sql.SQLException
private static var setBytes_MethodID_14: jmethodID?
open func setBytes( pos: Int64, bytes: [Int8]?, offset: Int, len: Int ) throws /* java.sql.SQLException */ -> Int {
var __args = [jvalue]( repeating: jvalue(), count: 4 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: pos, locals: &__locals )
__args[1] = JNIType.toJava( value: bytes, locals: &__locals )
__args[2] = JNIType.toJava( value: offset, locals: &__locals )
__args[3] = JNIType.toJava( value: len, locals: &__locals )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "setBytes", methodSig: "(J[BII)I", methodCache: &BlobForward.setBytes_MethodID_14, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: Int(), from: __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 int java.sql.Blob.setBytes(long,byte[]) throws java.sql.SQLException
private static var setBytes_MethodID_15: jmethodID?
open func setBytes( pos: Int64, bytes: [Int8]? ) throws /* java.sql.SQLException */ -> Int {
var __args = [jvalue]( repeating: jvalue(), count: 2 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: pos, locals: &__locals )
__args[1] = JNIType.toJava( value: bytes, locals: &__locals )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "setBytes", methodSig: "(J[B)I", methodCache: &BlobForward.setBytes_MethodID_15, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
throw SQLException( javaObject: throwable )
}
return JNIType.toSwift( type: Int(), from: __return )
}
open func setBytes( _ _pos: Int64, _ _bytes: [Int8]? ) throws /* java.sql.SQLException */ -> Int {
return try setBytes( pos: _pos, bytes: _bytes )
}
/// public abstract java.io.OutputStream java.sql.Blob.setBinaryStream(long) throws java.sql.SQLException
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream(long,long) throws java.sql.SQLException
/// public abstract java.io.InputStream java.sql.Blob.getBinaryStream() throws java.sql.SQLException
/// public abstract void java.sql.Blob.free() throws java.sql.SQLException
private static var free_MethodID_16: jmethodID?
open func free() throws /* java.sql.SQLException */ {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
JNIMethod.CallVoidMethod( object: javaObject, methodName: "free", methodSig: "()V", methodCache: &BlobForward.free_MethodID_16, args: &__args, locals: &__locals )
if let throwable = JNI.ExceptionCheck() {
throw SQLException( javaObject: throwable )
}
}
}