java_to_base64 0.0.1-java → 0.0.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/java_to_base64.rb +5 -1
- data/lib/java_to_base64/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fa451667295116d23951caa98b47a424565ec17
|
4
|
+
data.tar.gz: 709617ecd361b89696b742e5a6a9c68bbdbbf457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e14fb7ee5ed2c616a93c902b7fa6ef605ea84713617683878e8eebcca705466c2143317a59b1348490fae19a58f59403402570b0b261c7c25a39f4bcacb8e2
|
7
|
+
data.tar.gz: 89d8468750313c4faabe53116b835eb2fb09f693c31c63b383b948eb3b8aa91d9e79d961784c95dd075b0e4a9fa5b714cd4f58a1193bb17144ffb495ffbe19ff
|
data/lib/java_to_base64.rb
CHANGED
@@ -8,7 +8,7 @@ end
|
|
8
8
|
|
9
9
|
module JavaToBase64
|
10
10
|
def self.included(klass)
|
11
|
-
unless
|
11
|
+
unless java_instance_of?(klass, ::Java::JavaIo::Serializable)
|
12
12
|
warn <<-SERIALIZABLE
|
13
13
|
To include JavaToBase64 in a Java class you must implement java.io.Serializable
|
14
14
|
SERIALIZABLE
|
@@ -20,6 +20,10 @@ module JavaToBase64
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.java_instance_of?(klass, klass_or_module)
|
24
|
+
return klass.java_kind_of?(klass_or_module) || klass.included_modules.include?(klass_or_module)
|
25
|
+
end
|
26
|
+
|
23
27
|
module InstanceMethods
|
24
28
|
def to_base64
|
25
29
|
byte_array_output_stream = java.io.ByteArrayOutputStream.new
|