So doing things steps by step, I'm having casting problems.
If I do :
Private info1() As Byte
Private bc As ByteConverter
info1=bc.IntsToBytes (dados)
It compiles but when running I get :
java.lang.IllegalArgumentException: argument 1 should have type int[], got byte[]
and If I do :
Private info1() As String
Private bc As ByteConverter
info1=bc.StringFromBytes (dados,"UTF-8")
It does not compile and throws :
Compiling code. Error
Error compiling program.
Error description: Cannot cast type: {Type=String,Rank=0, RemoteObject=True} to: {Type=String,Rank=1, RemoteObject=True}
Occurred on line: 193
info1=bc.StringFromBytes (dados,"UTF-8")
Word: )
If I try (as a curiosity)
Private info1() As Int
Private bc As ByteConverter
info1=bc.IntsFromBytes (dados)
I get barbaric numbers as 1382379715 (0x526570C3) / -1167954839 (0xBA626C69) / 1667309648 (0x63612050)...etc
So I'v created a sub in CardReader code module as this :
Sub ByteArrayConversion (barray() As Byte ) As String()
Private arraysaida(barray.Length) As String
For f=0 To barray.Length-1
Private bc As ByteConverter
arraysaida(f)=bc.StringFromBytes (barray(f),"UTF-8")
Next
Return arraysaida
End Sub
Then trwoing the Dados Object as a parameter, expecting it to be returned as a string..Same problems.
Grrrrr. getting crazy !!!!