package gunav2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class dbrequestmanager extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new BA(_ba, this, htSubs, "gunav2.keymon.com.mx.dbrequestmanager");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.dbrequestmanager.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public Object _mtarget = null;
public String _link = "";
public anywheresoftware.b4a.agraham.byteconverter.ByteConverter _bc = null;
public byte _t_null = (byte)0;
public byte _t_string = (byte)0;
public byte _t_short = (byte)0;
public byte _t_int = (byte)0;
public byte _t_long = (byte)0;
public byte _t_float = (byte)0;
public byte _t_double = (byte)0;
public byte _t_boolean = (byte)0;
public byte _t_blob = (byte)0;
public float _version = 0f;
public Object[] _temparray = null;
public String _jobtaganterior = "";
public anywheresoftware.b4a.objects.collections.List _reqslist = null;
public anywheresoftware.b4a.objects.collections.List _timeslist = null;
public long _iniciorequest = 0L;
public long _iniciojobdone = 0L;
public anywheresoftware.b4a.objects.collections.Map _iniciorequestmap = null;
public anywheresoftware.b4a.objects.collections.Map _iniciojobdonemap = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public static class _dbresult{
public boolean IsInitialized;
public Object Tag;
public anywheresoftware.b4a.objects.collections.Map Columns;
public anywheresoftware.b4a.objects.collections.List Rows;
public void Initialize() {
IsInitialized = true;
Tag = new Object();
Columns = new anywheresoftware.b4a.objects.collections.Map();
Rows = new anywheresoftware.b4a.objects.collections.List();
}
@Override
		public String toString() {
			return BA.TypeToString(this, false);
		}}
public static class _dbcommand{
public boolean IsInitialized;
public String Name;
public Object[] Parameters;
public void Initialize() {
IsInitialized = true;
Name = "";
Parameters = new Object[0];
{
int d0 = Parameters.length;
for (int i0 = 0;i0 < d0;i0++) {
Parameters[i0] = new Object();
}
}
;
}
@Override
		public String toString() {
			return BA.TypeToString(this, false);
		}}
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper  _bytestoimage(byte[] _bytes) throws Exception{
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
 //BA.debugLineNum = 277;BA.debugLine="Public Sub BytesToImage(bytes() As Byte) As Bitmap";
 //BA.debugLineNum = 278;BA.debugLine="Dim In As InputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
 //BA.debugLineNum = 279;BA.debugLine="In.InitializeFromBytesArray(bytes, 0, bytes.Lengt";
_in.InitializeFromBytesArray(_bytes,(int) (0),_bytes.length);
 //BA.debugLineNum = 280;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
 //BA.debugLineNum = 281;BA.debugLine="bmp.Initialize2(In)";
_bmp.Initialize2((java.io.InputStream)(_in.getObject()));
 //BA.debugLineNum = 282;BA.debugLine="Return bmp";
if (true) return _bmp;
 //BA.debugLineNum = 283;BA.debugLine="End Sub";
return null;
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 2;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 3;BA.debugLine="Private mTarget As Object";
_mtarget = new Object();
 //BA.debugLineNum = 4;BA.debugLine="Type DBResult (Tag As Object, Columns As Map, Row";
;
 //BA.debugLineNum = 5;BA.debugLine="Type DBCommand (Name As String, Parameters() As O";
;
 //BA.debugLineNum = 6;BA.debugLine="Private link As String";
_link = "";
 //BA.debugLineNum = 7;BA.debugLine="Private bc As ByteConverter";
_bc = new anywheresoftware.b4a.agraham.byteconverter.ByteConverter();
 //BA.debugLineNum = 8;BA.debugLine="Private T_NULL = 0, T_STRING = 1, T_SHORT = 2, T_";
_t_null = (byte) (0);
_t_string = (byte) (1);
_t_short = (byte) (2);
_t_int = (byte) (3);
_t_long = (byte) (4);
_t_float = (byte) (5);
_t_double = (byte) (6);
_t_boolean = (byte) (7);
_t_blob = (byte) (8);
 //BA.debugLineNum = 10;BA.debugLine="Private VERSION As Float = 0.9";
_version = (float) (0.9);
 //BA.debugLineNum = 11;BA.debugLine="Private tempArray(1) As Object";
_temparray = new Object[(int) (1)];
{
int d0 = _temparray.length;
for (int i0 = 0;i0 < d0;i0++) {
_temparray[i0] = new Object();
}
}
;
 //BA.debugLineNum = 12;BA.debugLine="Dim jobTagAnterior As String = \"\" 'Mod por CHV -";
_jobtaganterior = "";
 //BA.debugLineNum = 13;BA.debugLine="Dim reqsList, timesList As List";
_reqslist = new anywheresoftware.b4a.objects.collections.List();
_timeslist = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 14;BA.debugLine="Dim inicioRequest As Long 'ignore";
_iniciorequest = 0L;
 //BA.debugLineNum = 15;BA.debugLine="Dim inicioJobDone As Long 'ignore";
_iniciojobdone = 0L;
 //BA.debugLineNum = 16;BA.debugLine="Dim inicioRequestMap, inicioJobDoneMap As Map";
_iniciorequestmap = new anywheresoftware.b4a.objects.collections.Map();
_iniciojobdonemap = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 17;BA.debugLine="End Sub";
return "";
}
public String  _executebatch(anywheresoftware.b4a.objects.collections.List _listofcommands,Object _tag) throws Exception{
gunav2.keymon.com.mx.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
gunav2.keymon.com.mx.dbrequestmanager._dbcommand _command = null;
 //BA.debugLineNum = 64;BA.debugLine="Public Sub ExecuteBatch(ListOfCommands As List, Ta";
 //BA.debugLineNum = 65;BA.debugLine="Dim j As HttpJob";
_j = new gunav2.keymon.com.mx.httpjob();
 //BA.debugLineNum = 66;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 67;BA.debugLine="Dim out2 As OutputStream = StartJob(j, ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = _startjob(_j,_ms,_tag);
 //BA.debugLineNum = 68;BA.debugLine="WriteInt(ListOfCommands.Size, out2)";
_writeint(_listofcommands.getSize(),_out2);
 //BA.debugLineNum = 69;BA.debugLine="For Each Command As DBCommand In ListOfCommands";
{
final anywheresoftware.b4a.BA.IterableList group5 = _listofcommands;
final int groupLen5 = group5.getSize()
;int index5 = 0;
;
for (; index5 < groupLen5;index5++){
_command = (gunav2.keymon.com.mx.dbrequestmanager._dbcommand)(group5.Get(index5));
 //BA.debugLineNum = 70;BA.debugLine="WriteObject(Command.Name, out2)";
_writeobject((Object)(_command.Name /*String*/ ),_out2);
 //BA.debugLineNum = 71;BA.debugLine="WriteList(Command.Parameters, out2)";
_writelist(anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
 }
};
 //BA.debugLineNum = 73;BA.debugLine="out2.Close";
_out2.Close();
 //BA.debugLineNum = 74;BA.debugLine="j.PostBytes(link & \"?method=batch\", ms.ToBytesArr";
_j._postbytes /*String*/ (_link+"?method=batch",_ms.ToBytesArray());
 //BA.debugLineNum = 75;BA.debugLine="End Sub";
return "";
}
public String  _executecommand(gunav2.keymon.com.mx.dbrequestmanager._dbcommand _command,Object _tag) throws Exception{
 //BA.debugLineNum = 78;BA.debugLine="Public Sub ExecuteCommand(Command As DBCommand, Ta";
 //BA.debugLineNum = 81;BA.debugLine="ExecuteBatch(Array As DBCommand(Command), Tag)";
_executebatch(anywheresoftware.b4a.keywords.Common.ArrayToList(new gunav2.keymon.com.mx.dbrequestmanager._dbcommand[]{_command}),_tag);
 //BA.debugLineNum = 82;BA.debugLine="End Sub";
return "";
}
public String  _executequery(gunav2.keymon.com.mx.dbrequestmanager._dbcommand _command,int _limit,Object _tag) throws Exception{
gunav2.keymon.com.mx.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
 //BA.debugLineNum = 30;BA.debugLine="Public Sub ExecuteQuery(Command As DBCommand, Limi";
 //BA.debugLineNum = 31;BA.debugLine="Dim j As HttpJob";
_j = new gunav2.keymon.com.mx.httpjob();
 //BA.debugLineNum = 32;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Dim out2 As OutputStream = StartJob(j, ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = _startjob(_j,_ms,_tag);
 //BA.debugLineNum = 37;BA.debugLine="WriteObject(Command.Name, out2)";
_writeobject((Object)(_command.Name /*String*/ ),_out2);
 //BA.debugLineNum = 38;BA.debugLine="WriteInt(Limit, out2)";
_writeint(_limit,_out2);
 //BA.debugLineNum = 39;BA.debugLine="WriteList(Command.Parameters, out2)";
_writelist(anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
 //BA.debugLineNum = 40;BA.debugLine="out2.Close";
_out2.Close();
 //BA.debugLineNum = 41;BA.debugLine="j.PostBytes(link & \"?method=query\", ms.ToBytesArr";
_j._postbytes /*String*/ (_link+"?method=query",_ms.ToBytesArray());
 //BA.debugLineNum = 42;BA.debugLine="End Sub";
return "";
}
public String  _executequery3(gunav2.keymon.com.mx.dbrequestmanager._dbcommand _command,int _limit,Object _tag,int _timeout) throws Exception{
gunav2.keymon.com.mx.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
 //BA.debugLineNum = 49;BA.debugLine="Public Sub ExecuteQuery3(Command As DBCommand, Lim";
 //BA.debugLineNum = 50;BA.debugLine="Dim j As HttpJob";
_j = new gunav2.keymon.com.mx.httpjob();
 //BA.debugLineNum = 51;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 52;BA.debugLine="Dim out2 As OutputStream = StartJob(j,ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = _startjob(_j,_ms,_tag);
 //BA.debugLineNum = 53;BA.debugLine="WriteObject(Command.Name, out2)";
_writeobject((Object)(_command.Name /*String*/ ),_out2);
 //BA.debugLineNum = 54;BA.debugLine="WriteInt(Limit, out2)";
_writeint(_limit,_out2);
 //BA.debugLineNum = 55;BA.debugLine="WriteList(Command.Parameters, out2)";
_writelist(anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
 //BA.debugLineNum = 56;BA.debugLine="out2.Close";
_out2.Close();
 //BA.debugLineNum = 57;BA.debugLine="j.PostBytes(link & \"?method=query\", ms.ToBytesArr";
_j._postbytes /*String*/ (_link+"?method=query",_ms.ToBytesArray());
 //BA.debugLineNum = 58;BA.debugLine="If Timeout <> 0 Then  j.GetRequest.Timeout = Time";
if (_timeout!=0) { 
_j._getrequest /*anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest*/ ().setTimeout(_timeout);};
 //BA.debugLineNum = 59;BA.debugLine="End Sub";
return "";
}
public byte[]  _filetobytes(String _dir,String _filename) throws Exception{
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
 //BA.debugLineNum = 258;BA.debugLine="Public Sub FileToBytes(Dir As String, FileName As";
 //BA.debugLineNum = 259;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 260;BA.debugLine="out.InitializeToBytesArray(0)";
_out.InitializeToBytesArray((int) (0));
 //BA.debugLineNum = 261;BA.debugLine="Dim In As InputStream = File.OpenInput(Dir, FileN";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_in = __c.File.OpenInput(_dir,_filename);
 //BA.debugLineNum = 262;BA.debugLine="File.Copy2(In, out)";
__c.File.Copy2((java.io.InputStream)(_in.getObject()),(java.io.OutputStream)(_out.getObject()));
 //BA.debugLineNum = 263;BA.debugLine="out.Close";
_out.Close();
 //BA.debugLineNum = 264;BA.debugLine="Return out.ToBytesArray";
if (true) return _out.ToBytesArray();
 //BA.debugLineNum = 265;BA.debugLine="End Sub";
return null;
}
public gunav2.keymon.com.mx.dbrequestmanager._dbresult  _handlejob(gunav2.keymon.com.mx.httpjob _job) throws Exception{
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
anywheresoftware.b4a.randomaccessfile.CompressedStreams _cs = null;
float _serverversion = 0f;
String _method = "";
gunav2.keymon.com.mx.dbrequestmanager._dbresult _table = null;
int _numberofcolumns = 0;
int _i = 0;
Object[] _rowobjects = null;
int _col = 0;
Object _o = null;
int _rows = 0;
 //BA.debugLineNum = 210;BA.debugLine="Public Sub HandleJob(Job As HttpJob) As DBResult";
 //BA.debugLineNum = 211;BA.debugLine="If jobTagAnterior <> Job.Tag Then";
if ((_jobtaganterior).equals(BA.ObjectToString(_job._tag /*Object*/ )) == false) { 
 //BA.debugLineNum = 213;BA.debugLine="If inicioJobDoneMap.IsInitialized Then inicioJob";
if (_iniciojobdonemap.IsInitialized()) { 
_iniciojobdonemap.Put(_job._tag /*Object*/ ,(Object)(__c.DateTime.getNow()));};
 };
 //BA.debugLineNum = 218;BA.debugLine="Dim In As InputStream = Job.GetInputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_in = _job._getinputstream /*anywheresoftware.b4a.objects.streams.File.InputStreamWrapper*/ ();
 //BA.debugLineNum = 219;BA.debugLine="Dim cs As CompressedStreams";
_cs = new anywheresoftware.b4a.randomaccessfile.CompressedStreams();
 //BA.debugLineNum = 220;BA.debugLine="In = cs.WrapInputStream(In, \"gzip\")";
_in = _cs.WrapInputStream((java.io.InputStream)(_in.getObject()),"gzip");
 //BA.debugLineNum = 221;BA.debugLine="Dim serverVersion As Float = ReadObject(In) 'igno";
_serverversion = (float)(BA.ObjectToNumber(_readobject(_in)));
 //BA.debugLineNum = 222;BA.debugLine="Dim method As String = ReadObject(In)";
_method = BA.ObjectToString(_readobject(_in));
 //BA.debugLineNum = 223;BA.debugLine="Dim table As DBResult";
_table = new gunav2.keymon.com.mx.dbrequestmanager._dbresult();
 //BA.debugLineNum = 224;BA.debugLine="table.Initialize";
_table.Initialize();
 //BA.debugLineNum = 225;BA.debugLine="table.Columns.Initialize";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
 //BA.debugLineNum = 226;BA.debugLine="table.rows.Initialize";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
 //BA.debugLineNum = 227;BA.debugLine="table.Tag = Job.Tag";
_table.Tag /*Object*/  = _job._tag /*Object*/ ;
 //BA.debugLineNum = 228;BA.debugLine="If method = \"query\" Then";
if ((_method).equals("query")) { 
 //BA.debugLineNum = 229;BA.debugLine="Dim numberOfColumns As Int = ReadInt(In)";
_numberofcolumns = _readint(_in);
 //BA.debugLineNum = 230;BA.debugLine="For i = 0 To numberOfColumns - 1";
{
final int step16 = 1;
final int limit16 = (int) (_numberofcolumns-1);
_i = (int) (0) ;
for (;_i <= limit16 ;_i = _i + step16 ) {
 //BA.debugLineNum = 231;BA.debugLine="table.Columns.Put(ReadObject(In), i)";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Put(_readobject(_in),(Object)(_i));
 }
};
 //BA.debugLineNum = 233;BA.debugLine="Do While ReadByte(In) = 1";
while (_readbyte(_in)==1) {
 //BA.debugLineNum = 234;BA.debugLine="Dim rowObjects(numberOfColumns) As Object";
_rowobjects = new Object[_numberofcolumns];
{
int d0 = _rowobjects.length;
for (int i0 = 0;i0 < d0;i0++) {
_rowobjects[i0] = new Object();
}
}
;
 //BA.debugLineNum = 235;BA.debugLine="table.rows.Add(rowObjects)";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_rowobjects));
 //BA.debugLineNum = 236;BA.debugLine="For col = 0 To numberOfColumns - 1";
{
final int step22 = 1;
final int limit22 = (int) (_numberofcolumns-1);
_col = (int) (0) ;
for (;_col <= limit22 ;_col = _col + step22 ) {
 //BA.debugLineNum = 237;BA.debugLine="Dim o As Object = ReadObject(In)";
_o = _readobject(_in);
 //BA.debugLineNum = 238;BA.debugLine="rowObjects(col) = o";
_rowobjects[_col] = _o;
 }
};
 }
;
 }else if((_method).equals("batch")) { 
 //BA.debugLineNum = 242;BA.debugLine="table.Columns.Put(\"AffectedRows\", 0)";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Put((Object)("AffectedRows"),(Object)(0));
 //BA.debugLineNum = 243;BA.debugLine="Dim rows As Int = ReadInt(In)";
_rows = _readint(_in);
 //BA.debugLineNum = 244;BA.debugLine="For i = 0 To rows - 1";
{
final int step30 = 1;
final int limit30 = (int) (_rows-1);
_i = (int) (0) ;
for (;_i <= limit30 ;_i = _i + step30 ) {
 //BA.debugLineNum = 245;BA.debugLine="table.rows.Add(Array As Object(ReadInt(In)))";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(new Object[]{(Object)(_readint(_in))}));
 }
};
 };
 //BA.debugLineNum = 248;BA.debugLine="In.Close";
_in.Close();
 //BA.debugLineNum = 250;BA.debugLine="If jobTagAnterior <> table.Tag Then";
if ((_jobtaganterior).equals(BA.ObjectToString(_table.Tag /*Object*/ )) == false) { 
 //BA.debugLineNum = 251;BA.debugLine="LogColor(\"HandleJob: '\"&table.Tag&\"'\" & \" - Regi";
__c.LogImpl("452035625","HandleJob: '"+BA.ObjectToString(_table.Tag /*Object*/ )+"'"+" - Registros: "+BA.NumberToString(_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.RGB((int) (115),(int) (0),(int) (140)));
 };
 //BA.debugLineNum = 253;BA.debugLine="jobTagAnterior = table.Tag  'Mod por CHV - 211109";
_jobtaganterior = BA.ObjectToString(_table.Tag /*Object*/ );
 //BA.debugLineNum = 254;BA.debugLine="Return table";
if (true) return _table;
 //BA.debugLineNum = 255;BA.debugLine="End Sub";
return null;
}
public byte[]  _imagetobytes(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) throws Exception{
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
 //BA.debugLineNum = 268;BA.debugLine="Public Sub ImageToBytes(Image As Bitmap) As Byte()";
 //BA.debugLineNum = 269;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 270;BA.debugLine="out.InitializeToBytesArray(0)";
_out.InitializeToBytesArray((int) (0));
 //BA.debugLineNum = 271;BA.debugLine="Image.WriteToStream(out, 100, \"JPEG\")";
_image.WriteToStream((java.io.OutputStream)(_out.getObject()),(int) (100),BA.getEnumFromString(android.graphics.Bitmap.CompressFormat.class,"JPEG"));
 //BA.debugLineNum = 272;BA.debugLine="out.Close";
_out.Close();
 //BA.debugLineNum = 273;BA.debugLine="Return out.ToBytesArray";
if (true) return _out.ToBytesArray();
 //BA.debugLineNum = 274;BA.debugLine="End Sub";
return null;
}
public String  _initialize(anywheresoftware.b4a.BA _ba,Object _target,String _connectorlink) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 21;BA.debugLine="Public Sub Initialize (Target As Object, Connector";
 //BA.debugLineNum = 22;BA.debugLine="mTarget = Target";
_mtarget = _target;
 //BA.debugLineNum = 23;BA.debugLine="link = ConnectorLink";
_link = _connectorlink;
 //BA.debugLineNum = 24;BA.debugLine="End Sub";
return "";
}
public String  _printtable(gunav2.keymon.com.mx.dbrequestmanager._dbresult _table) throws Exception{
anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
Object _col = null;
Object[] _row = null;
Object _record = null;
 //BA.debugLineNum = 286;BA.debugLine="Public Sub PrintTable(Table As DBResult)";
 //BA.debugLineNum = 287;BA.debugLine="Log(\"Tag: \" & Table.Tag & \", Columns: \" & Table.C";
__c.LogImpl("452297729","Tag: "+BA.ObjectToString(_table.Tag /*Object*/ )+", Columns: "+BA.NumberToString(_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .getSize())+", Rows: "+BA.NumberToString(_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),0);
 //BA.debugLineNum = 288;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 289;BA.debugLine="sb.Initialize";
_sb.Initialize();
 //BA.debugLineNum = 290;BA.debugLine="For Each col In Table.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group4 = _table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen4 = group4.getSize()
;int index4 = 0;
;
for (; index4 < groupLen4;index4++){
_col = group4.Get(index4);
 //BA.debugLineNum = 291;BA.debugLine="sb.Append(col).Append(TAB)";
_sb.Append(BA.ObjectToString(_col)).Append(__c.TAB);
 }
};
 //BA.debugLineNum = 293;BA.debugLine="Log(sb.ToString)";
__c.LogImpl("452297735",_sb.ToString(),0);
 //BA.debugLineNum = 294;BA.debugLine="For Each row() As Object In Table.Rows";
{
final anywheresoftware.b4a.BA.IterableList group8 = _table.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen8 = group8.getSize()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_row = (Object[])(group8.Get(index8));
 //BA.debugLineNum = 295;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 296;BA.debugLine="sb.Initialize";
_sb.Initialize();
 //BA.debugLineNum = 297;BA.debugLine="For Each record As Object In row";
{
final Object[] group11 = _row;
final int groupLen11 = group11.length
;int index11 = 0;
;
for (; index11 < groupLen11;index11++){
_record = group11[index11];
 //BA.debugLineNum = 298;BA.debugLine="sb.Append(record).Append(TAB)";
_sb.Append(BA.ObjectToString(_record)).Append(__c.TAB);
 }
};
 //BA.debugLineNum = 300;BA.debugLine="Log(sb.ToString)";
__c.LogImpl("452297742",_sb.ToString(),0);
 }
};
 //BA.debugLineNum = 302;BA.debugLine="End Sub";
return "";
}
public byte  _readbyte(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
byte[] _data = null;
 //BA.debugLineNum = 203;BA.debugLine="Private Sub ReadByte(In As InputStream) As Byte";
 //BA.debugLineNum = 204;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
 //BA.debugLineNum = 205;BA.debugLine="In.ReadBytes(data, 0, 1)";
_in.ReadBytes(_data,(int) (0),(int) (1));
 //BA.debugLineNum = 206;BA.debugLine="Return data(0)";
if (true) return _data[(int) (0)];
 //BA.debugLineNum = 207;BA.debugLine="End Sub";
return (byte)0;
}
public byte[]  _readbytesfully(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in,byte[] _data,int _len) throws Exception{
int _count = 0;
int _read = 0;
 //BA.debugLineNum = 183;BA.debugLine="Private Sub ReadBytesFully(In As InputStream, Data";
 //BA.debugLineNum = 184;BA.debugLine="Dim count = 0, read As Int";
_count = (int) (0);
_read = 0;
 //BA.debugLineNum = 185;BA.debugLine="Do While count < Len And read > -1";
while (_count<_len && _read>-1) {
 //BA.debugLineNum = 186;BA.debugLine="read = In.ReadBytes(Data, count, Len - count)";
_read = _in.ReadBytes(_data,_count,(int) (_len-_count));
 //BA.debugLineNum = 187;BA.debugLine="count = count + read";
_count = (int) (_count+_read);
 }
;
 //BA.debugLineNum = 189;BA.debugLine="Return Data";
if (true) return _data;
 //BA.debugLineNum = 190;BA.debugLine="End Sub";
return null;
}
public int  _readint(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
byte[] _data = null;
 //BA.debugLineNum = 198;BA.debugLine="Private Sub ReadInt(In As InputStream) As Int";
 //BA.debugLineNum = 199;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
 //BA.debugLineNum = 200;BA.debugLine="Return bc.IntsFromBytes(ReadBytesFully(In, data,";
if (true) return _bc.IntsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)];
 //BA.debugLineNum = 201;BA.debugLine="End Sub";
return 0;
}
public Object  _readobject(anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
byte[] _data = null;
byte _b = (byte)0;
int _len = 0;
 //BA.debugLineNum = 147;BA.debugLine="Private Sub ReadObject(In As InputStream) As Objec";
 //BA.debugLineNum = 148;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
 //BA.debugLineNum = 149;BA.debugLine="In.ReadBytes(data, 0, 1)";
_in.ReadBytes(_data,(int) (0),(int) (1));
 //BA.debugLineNum = 150;BA.debugLine="Select data(0)";
switch (BA.switchObjectToInt(_data[(int) (0)],_t_null,_t_short,_t_int,_t_long,_t_float,_t_double,_t_boolean,_t_blob)) {
case 0: {
 //BA.debugLineNum = 152;BA.debugLine="Return Null";
if (true) return __c.Null;
 break; }
case 1: {
 //BA.debugLineNum = 154;BA.debugLine="Dim data(2) As Byte";
_data = new byte[(int) (2)];
;
 //BA.debugLineNum = 155;BA.debugLine="Return bc.ShortsFromBytes(ReadBytesFully(In, da";
if (true) return (Object)(_bc.ShortsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
 break; }
case 2: {
 //BA.debugLineNum = 157;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
 //BA.debugLineNum = 158;BA.debugLine="Return bc.IntsFromBytes(ReadBytesFully(In, data";
if (true) return (Object)(_bc.IntsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
 break; }
case 3: {
 //BA.debugLineNum = 160;BA.debugLine="Dim data(8) As Byte";
_data = new byte[(int) (8)];
;
 //BA.debugLineNum = 161;BA.debugLine="Return bc.LongsFromBytes(ReadBytesFully(In, dat";
if (true) return (Object)(_bc.LongsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
 break; }
case 4: {
 //BA.debugLineNum = 163;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
 //BA.debugLineNum = 164;BA.debugLine="Return bc.FloatsFromBytes(ReadBytesFully(In, da";
if (true) return (Object)(_bc.FloatsFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
 break; }
case 5: {
 //BA.debugLineNum = 166;BA.debugLine="Dim data(8) As Byte";
_data = new byte[(int) (8)];
;
 //BA.debugLineNum = 167;BA.debugLine="Return bc.DoublesFromBytes(ReadBytesFully(In, d";
if (true) return (Object)(_bc.DoublesFromBytes(_readbytesfully(_in,_data,_data.length))[(int) (0)]);
 break; }
case 6: {
 //BA.debugLineNum = 169;BA.debugLine="Dim b As Byte = ReadByte(In)";
_b = _readbyte(_in);
 //BA.debugLineNum = 170;BA.debugLine="Return b = 1";
if (true) return (Object)(_b==1);
 break; }
case 7: {
 //BA.debugLineNum = 172;BA.debugLine="Dim len As Int = ReadInt(In)";
_len = _readint(_in);
 //BA.debugLineNum = 173;BA.debugLine="Dim data(len) As Byte";
_data = new byte[_len];
;
 //BA.debugLineNum = 174;BA.debugLine="Return ReadBytesFully(In, data, data.Length)";
if (true) return (Object)(_readbytesfully(_in,_data,_data.length));
 break; }
default: {
 //BA.debugLineNum = 176;BA.debugLine="Dim len As Int = ReadInt(In)";
_len = _readint(_in);
 //BA.debugLineNum = 177;BA.debugLine="Dim data(len) As Byte";
_data = new byte[_len];
;
 //BA.debugLineNum = 178;BA.debugLine="ReadBytesFully(In, data, data.Length)";
_readbytesfully(_in,_data,_data.length);
 //BA.debugLineNum = 179;BA.debugLine="Return BytesToString(data, 0, data.Length, \"UTF";
if (true) return (Object)(__c.BytesToString(_data,(int) (0),_data.length,"UTF8"));
 break; }
}
;
 //BA.debugLineNum = 181;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.collections.Map  _requesttimes(String _tag) throws Exception{
anywheresoftware.b4a.objects.collections.Map _times = null;
String _requesttime = "";
String _jobdonetime = "";
 //BA.debugLineNum = 304;BA.debugLine="Sub requestTimes(tag As String) As Map 'ignore";
 //BA.debugLineNum = 305;BA.debugLine="Private times As Map";
_times = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 306;BA.debugLine="times.Initialize";
_times.Initialize();
 //BA.debugLineNum = 309;BA.debugLine="If reqsList.IsInitialized Then";
if (_reqslist.IsInitialized()) { 
 //BA.debugLineNum = 312;BA.debugLine="If inicioRequestMap.ContainsKey(tag) Then";
if (_iniciorequestmap.ContainsKey((Object)(_tag))) { 
 //BA.debugLineNum = 313;BA.debugLine="inicioRequest = inicioRequestMap.Get(tag)";
_iniciorequest = BA.ObjectToLongNumber(_iniciorequestmap.Get((Object)(_tag)));
 };
 //BA.debugLineNum = 316;BA.debugLine="If inicioJobDoneMap.ContainsKey(tag) Then";
if (_iniciojobdonemap.ContainsKey((Object)(_tag))) { 
 //BA.debugLineNum = 317;BA.debugLine="inicioJobDone = inicioJobDoneMap.Get(tag)";
_iniciojobdone = BA.ObjectToLongNumber(_iniciojobdonemap.Get((Object)(_tag)));
 };
 };
 //BA.debugLineNum = 322;BA.debugLine="Private requestTime As String = NumberFormat2(((i";
_requesttime = __c.NumberFormat2(((_iniciojobdone-_iniciorequest)/(double)1000),(int) (1),(int) (5),(int) (0),__c.False);
 //BA.debugLineNum = 323;BA.debugLine="Private JobDoneTime As String = NumberFormat2(((D";
_jobdonetime = __c.NumberFormat2(((__c.DateTime.getNow()-_iniciojobdone)/(double)1000),(int) (1),(int) (5),(int) (0),__c.False);
 //BA.debugLineNum = 324;BA.debugLine="times.Put(\"requestTime\", requestTime)";
_times.Put((Object)("requestTime"),(Object)(_requesttime));
 //BA.debugLineNum = 325;BA.debugLine="times.Put(\"jobDoneTime\", JobDoneTime)";
_times.Put((Object)("jobDoneTime"),(Object)(_jobdonetime));
 //BA.debugLineNum = 326;BA.debugLine="times.Put(\"totalTime\", NumberFormat2((JobDoneTime";
_times.Put((Object)("totalTime"),(Object)(__c.NumberFormat2(((double)(Double.parseDouble(_jobdonetime))+(double)(Double.parseDouble(_requesttime))),(int) (1),(int) (5),(int) (0),__c.False)));
 //BA.debugLineNum = 327;BA.debugLine="Return times";
if (true) return _times;
 //BA.debugLineNum = 328;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper  _startjob(gunav2.keymon.com.mx.httpjob _j,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _memorystream,Object _tag) throws Exception{
anywheresoftware.b4a.randomaccessfile.CompressedStreams _compress = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
 //BA.debugLineNum = 84;BA.debugLine="Private Sub StartJob(j As HttpJob, MemoryStream As";
 //BA.debugLineNum = 86;BA.debugLine="If reqsList.IsInitialized Then reqsList.Add(Tag)";
if (_reqslist.IsInitialized()) { 
_reqslist.Add(_tag);};
 //BA.debugLineNum = 87;BA.debugLine="If timesList.IsInitialized Then timesList.Add(Dat";
if (_timeslist.IsInitialized()) { 
_timeslist.Add((Object)(__c.DateTime.getNow()));};
 //BA.debugLineNum = 88;BA.debugLine="j.Initialize(\"DBRequest\", mTarget)";
_j._initialize /*String*/ (ba,"DBRequest",_mtarget);
 //BA.debugLineNum = 89;BA.debugLine="j.Tag = Tag";
_j._tag /*Object*/  = _tag;
 //BA.debugLineNum = 90;BA.debugLine="MemoryStream.InitializeToBytesArray(0)";
_memorystream.InitializeToBytesArray((int) (0));
 //BA.debugLineNum = 91;BA.debugLine="Dim compress As CompressedStreams";
_compress = new anywheresoftware.b4a.randomaccessfile.CompressedStreams();
 //BA.debugLineNum = 92;BA.debugLine="Dim out As OutputStream = compress.WrapOutputStre";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out = _compress.WrapOutputStream((java.io.OutputStream)(_memorystream.getObject()),"gzip");
 //BA.debugLineNum = 93;BA.debugLine="WriteObject(VERSION, out)";
_writeobject((Object)(_version),_out);
 //BA.debugLineNum = 94;BA.debugLine="Return out";
if (true) return _out;
 //BA.debugLineNum = 95;BA.debugLine="End Sub";
return null;
}
public String  _trackinit() throws Exception{
 //BA.debugLineNum = 331;BA.debugLine="Sub trackInit 'ignore";
 //BA.debugLineNum = 332;BA.debugLine="Log(\">>>>>>>>>  TRACKINIT \")";
__c.LogImpl("452428801",">>>>>>>>>  TRACKINIT ",0);
 //BA.debugLineNum = 333;BA.debugLine="reqsList.Initialize";
_reqslist.Initialize();
 //BA.debugLineNum = 334;BA.debugLine="timesList.Initialize";
_timeslist.Initialize();
 //BA.debugLineNum = 335;BA.debugLine="inicioRequestMap.Initialize";
_iniciorequestmap.Initialize();
 //BA.debugLineNum = 336;BA.debugLine="inicioJobDoneMap.Initialize";
_iniciojobdonemap.Initialize();
 //BA.debugLineNum = 337;BA.debugLine="End Sub";
return "";
}
public String  _tracknext(gunav2.keymon.com.mx.httpjob _job) throws Exception{
String _quitamos = "";
int _pos = 0;
 //BA.debugLineNum = 339;BA.debugLine="Sub trackNext(job As HttpJob)";
 //BA.debugLineNum = 340;BA.debugLine="If reqsList.IsInitialized Then 'Si tenemos lista";
if (_reqslist.IsInitialized()) { 
 //BA.debugLineNum = 341;BA.debugLine="Private quitamos As String = \"\"";
_quitamos = "";
 //BA.debugLineNum = 342;BA.debugLine="If reqsList.IndexOf(job.tag) <> -1 Then";
if (_reqslist.IndexOf(_job._tag /*Object*/ )!=-1) { 
 //BA.debugLineNum = 343;BA.debugLine="Private pos As Int = reqsList.IndexOf(job.tag)";
_pos = _reqslist.IndexOf(_job._tag /*Object*/ );
 //BA.debugLineNum = 344;BA.debugLine="If pos <> -1 Then";
if (_pos!=-1) { 
 //BA.debugLineNum = 345;BA.debugLine="inicioRequestMap.Put(job.Tag, timesList.Get(po";
_iniciorequestmap.Put(_job._tag /*Object*/ ,_timeslist.Get(_pos));
 //BA.debugLineNum = 346;BA.debugLine="reqsList.RemoveAt(pos)";
_reqslist.RemoveAt(_pos);
 //BA.debugLineNum = 347;BA.debugLine="timesList.RemoveAt(pos)";
_timeslist.RemoveAt(_pos);
 };
 //BA.debugLineNum = 349;BA.debugLine="quitamos = $\"Quitamos ${job.tag} - \"$";
_quitamos = ("Quitamos "+__c.SmartStringFormatter("",_job._tag /*Object*/ )+" - ");
 };
 //BA.debugLineNum = 351;BA.debugLine="LogColor(\">>>>>> Requests: \" & reqsList.Size & \"";
__c.LogImpl("452494348",">>>>>> Requests: "+BA.NumberToString(_reqslist.getSize())+" - "+_quitamos+BA.ObjectToString(_reqslist),__c.Colors.Blue);
 //BA.debugLineNum = 352;BA.debugLine="LogColor(\">>>>>> inicioRequestMap:\" & inicioRequ";
__c.LogImpl("452494349",">>>>>> inicioRequestMap:"+BA.NumberToString(_iniciorequestmap.getSize())+" - "+BA.ObjectToString(_iniciorequestmap),__c.Colors.Magenta);
 };
 //BA.debugLineNum = 354;BA.debugLine="End Sub";
return "";
}
public String  _writeint(int _i,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
byte[] _data = null;
 //BA.debugLineNum = 192;BA.debugLine="Private Sub WriteInt(i As Int, out As OutputStream";
 //BA.debugLineNum = 193;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
 //BA.debugLineNum = 194;BA.debugLine="data = bc.IntsToBytes(Array As Int(i))";
_data = _bc.IntsToBytes(new int[]{_i});
 //BA.debugLineNum = 195;BA.debugLine="out.WriteBytes(data, 0, data.Length)";
_out.WriteBytes(_data,(int) (0),_data.length);
 //BA.debugLineNum = 196;BA.debugLine="End Sub";
return "";
}
public String  _writelist(anywheresoftware.b4a.objects.collections.List _parameters,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
byte[] _data = null;
Object _o = null;
 //BA.debugLineNum = 97;BA.debugLine="Private Sub WriteList(Parameters As List, out As O";
 //BA.debugLineNum = 98;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
 //BA.debugLineNum = 99;BA.debugLine="If Parameters = Null Or Parameters.IsInitialized";
if (_parameters== null || _parameters.IsInitialized()==__c.False) { 
 //BA.debugLineNum = 100;BA.debugLine="Dim Parameters As List";
_parameters = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 101;BA.debugLine="Parameters.Initialize";
_parameters.Initialize();
 };
 //BA.debugLineNum = 103;BA.debugLine="data = bc.IntsToBytes(Array As Int(Parameters.Siz";
_data = _bc.IntsToBytes(new int[]{_parameters.getSize()});
 //BA.debugLineNum = 104;BA.debugLine="out.WriteBytes(data, 0, data.Length)";
_out.WriteBytes(_data,(int) (0),_data.length);
 //BA.debugLineNum = 105;BA.debugLine="For Each o As Object In Parameters";
{
final anywheresoftware.b4a.BA.IterableList group8 = _parameters;
final int groupLen8 = group8.getSize()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_o = group8.Get(index8);
 //BA.debugLineNum = 106;BA.debugLine="WriteObject(o, out)";
_writeobject(_o,_out);
 }
};
 //BA.debugLineNum = 108;BA.debugLine="End Sub";
return "";
}
public String  _writeobject(Object _o,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
byte[] _data = null;
boolean _b = false;
 //BA.debugLineNum = 110;BA.debugLine="Private Sub WriteObject(o As Object, out As Output";
 //BA.debugLineNum = 111;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
 //BA.debugLineNum = 112;BA.debugLine="tempArray(0) = o";
_temparray[(int) (0)] = _o;
 //BA.debugLineNum = 113;BA.debugLine="If tempArray(0) = Null Then";
if (_temparray[(int) (0)]== null) { 
 //BA.debugLineNum = 114;BA.debugLine="out.WriteBytes(Array As Byte(T_NULL), 0, 1)";
_out.WriteBytes(new byte[]{_t_null},(int) (0),(int) (1));
 }else if(_temparray[(int) (0)] instanceof Short) { 
 //BA.debugLineNum = 116;BA.debugLine="out.WriteBytes(Array As Byte(T_SHORT), 0, 1)";
_out.WriteBytes(new byte[]{_t_short},(int) (0),(int) (1));
 //BA.debugLineNum = 117;BA.debugLine="data = bc.ShortsToBytes(Array As Short(o))";
_data = _bc.ShortsToBytes(new short[]{(short)(BA.ObjectToNumber(_o))});
 }else if(_temparray[(int) (0)] instanceof Integer) { 
 //BA.debugLineNum = 119;BA.debugLine="out.WriteBytes(Array As Byte(T_INT), 0, 1)";
_out.WriteBytes(new byte[]{_t_int},(int) (0),(int) (1));
 //BA.debugLineNum = 120;BA.debugLine="data = bc.IntsToBytes(Array As Int(o))";
_data = _bc.IntsToBytes(new int[]{(int)(BA.ObjectToNumber(_o))});
 }else if(_temparray[(int) (0)] instanceof Float) { 
 //BA.debugLineNum = 122;BA.debugLine="out.WriteBytes(Array As Byte(T_FLOAT), 0, 1)";
_out.WriteBytes(new byte[]{_t_float},(int) (0),(int) (1));
 //BA.debugLineNum = 123;BA.debugLine="data = bc.FloatsToBytes(Array As Float(o))";
_data = _bc.FloatsToBytes(new float[]{(float)(BA.ObjectToNumber(_o))});
 }else if(_temparray[(int) (0)] instanceof Double) { 
 //BA.debugLineNum = 125;BA.debugLine="out.WriteBytes(Array As Byte(T_DOUBLE), 0, 1)";
_out.WriteBytes(new byte[]{_t_double},(int) (0),(int) (1));
 //BA.debugLineNum = 126;BA.debugLine="data = bc.DoublesToBytes(Array As Double(o))";
_data = _bc.DoublesToBytes(new double[]{(double)(BA.ObjectToNumber(_o))});
 }else if(_temparray[(int) (0)] instanceof Long) { 
 //BA.debugLineNum = 128;BA.debugLine="out.WriteBytes(Array As Byte(T_LONG), 0, 1)";
_out.WriteBytes(new byte[]{_t_long},(int) (0),(int) (1));
 //BA.debugLineNum = 129;BA.debugLine="data = bc.LongsToBytes(Array As Long(o))";
_data = _bc.LongsToBytes(new long[]{BA.ObjectToLongNumber(_o)});
 }else if(_temparray[(int) (0)] instanceof Boolean) { 
 //BA.debugLineNum = 131;BA.debugLine="out.WriteBytes(Array As Byte(T_BOOLEAN), 0, 1)";
_out.WriteBytes(new byte[]{_t_boolean},(int) (0),(int) (1));
 //BA.debugLineNum = 132;BA.debugLine="Dim b As Boolean = 0";
_b = BA.ObjectToBoolean(0);
 //BA.debugLineNum = 133;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
 //BA.debugLineNum = 134;BA.debugLine="If b Then data(0) = 1 Else data(0) = 0";
if (_b) { 
_data[(int) (0)] = (byte) (1);}
else {
_data[(int) (0)] = (byte) (0);};
 }else if((__c.GetType(_temparray[(int) (0)])).equals("[B")) { 
 //BA.debugLineNum = 136;BA.debugLine="data = o";
_data = (byte[])(_o);
 //BA.debugLineNum = 137;BA.debugLine="out.WriteBytes(Array As Byte(T_BLOB), 0, 1)";
_out.WriteBytes(new byte[]{_t_blob},(int) (0),(int) (1));
 //BA.debugLineNum = 138;BA.debugLine="WriteInt(data.Length, out)";
_writeint(_data.length,_out);
 }else {
 //BA.debugLineNum = 140;BA.debugLine="out.WriteBytes(Array As Byte(T_STRING), 0, 1)";
_out.WriteBytes(new byte[]{_t_string},(int) (0),(int) (1));
 //BA.debugLineNum = 141;BA.debugLine="data = bc.StringToBytes(o, \"UTF8\")";
_data = _bc.StringToBytes(BA.ObjectToString(_o),"UTF8");
 //BA.debugLineNum = 142;BA.debugLine="WriteInt(data.Length, out)";
_writeint(_data.length,_out);
 };
 //BA.debugLineNum = 144;BA.debugLine="If data.Length > 0 Then out.WriteBytes(data, 0, d";
if (_data.length>0) { 
_out.WriteBytes(_data,(int) (0),_data.length);};
 //BA.debugLineNum = 145;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}
