package keymon.lat.medicomed;


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 anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "keymon.lat.medicomed.dbrequestmanager");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", keymon.lat.medicomed.dbrequestmanager.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
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.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 b4a.example.dateutils _dateutils = null;
public keymon.lat.medicomed.main _main = null;
public keymon.lat.medicomed.starter _starter = null;
public keymon.lat.medicomed.subs _subs = null;
public keymon.lat.medicomed.appupdater _appupdater = null;
public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null;
public keymon.lat.medicomed.tracker _tracker = null;
public keymon.lat.medicomed.newinst2 _newinst2 = null;
public keymon.lat.medicomed.b4xpages _b4xpages = null;
public keymon.lat.medicomed.b4xcollections _b4xcollections = null;
public keymon.lat.medicomed.httputils2service _httputils2service = null;
public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null;
public String  _initialize(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.BA _ba,Object _target,String _connectorlink) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba,_target,_connectorlink}));}
RDebugUtils.currentLine=27131904;
 //BA.debugLineNum = 27131904;BA.debugLine="Public Sub Initialize (Target As Object, Connector";
RDebugUtils.currentLine=27131905;
 //BA.debugLineNum = 27131905;BA.debugLine="mTarget = Target";
__ref._mtarget /*Object*/  = _target;
RDebugUtils.currentLine=27131906;
 //BA.debugLineNum = 27131906;BA.debugLine="link = ConnectorLink";
__ref._link /*String*/  = _connectorlink;
RDebugUtils.currentLine=27131907;
 //BA.debugLineNum = 27131907;BA.debugLine="End Sub";
return "";
}
public String  _executequery(keymon.lat.medicomed.dbrequestmanager __ref,keymon.lat.medicomed.dbrequestmanager._dbcommand _command,int _limit,Object _tag) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "executequery", false))
	 {return ((String) Debug.delegate(ba, "executequery", new Object[] {_command,_limit,_tag}));}
keymon.lat.medicomed.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
RDebugUtils.currentLine=27197440;
 //BA.debugLineNum = 27197440;BA.debugLine="Public Sub ExecuteQuery(Command As DBCommand, Limi";
RDebugUtils.currentLine=27197441;
 //BA.debugLineNum = 27197441;BA.debugLine="Dim j As HttpJob";
_j = new keymon.lat.medicomed.httpjob();
RDebugUtils.currentLine=27197442;
 //BA.debugLineNum = 27197442;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
RDebugUtils.currentLine=27197443;
 //BA.debugLineNum = 27197443;BA.debugLine="Dim out2 As OutputStream = StartJob(j,ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = __ref._startjob /*anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper*/ (null,_j,_ms,_tag);
RDebugUtils.currentLine=27197445;
 //BA.debugLineNum = 27197445;BA.debugLine="WriteObject(Command.Name, out2)";
__ref._writeobject /*String*/ (null,(Object)(_command.Name /*String*/ ),_out2);
RDebugUtils.currentLine=27197446;
 //BA.debugLineNum = 27197446;BA.debugLine="WriteInt(Limit, out2)";
__ref._writeint /*String*/ (null,_limit,_out2);
RDebugUtils.currentLine=27197447;
 //BA.debugLineNum = 27197447;BA.debugLine="WriteList(Command.Parameters, out2)";
__ref._writelist /*String*/ (null,anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
RDebugUtils.currentLine=27197448;
 //BA.debugLineNum = 27197448;BA.debugLine="out2.Close";
_out2.Close();
RDebugUtils.currentLine=27197449;
 //BA.debugLineNum = 27197449;BA.debugLine="j.PostBytes(link & \"?method=query\", ms.ToBytesArr";
_j._postbytes /*String*/ (null,__ref._link /*String*/ +"?method=query",_ms.ToBytesArray());
RDebugUtils.currentLine=27197450;
 //BA.debugLineNum = 27197450;BA.debugLine="End Sub";
return "";
}
public keymon.lat.medicomed.dbrequestmanager._dbresult  _handlejob(keymon.lat.medicomed.dbrequestmanager __ref,keymon.lat.medicomed.httpjob _job) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "handlejob", false))
	 {return ((keymon.lat.medicomed.dbrequestmanager._dbresult) Debug.delegate(ba, "handlejob", new Object[] {_job}));}
long _start = 0L;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
anywheresoftware.b4a.randomaccessfile.CompressedStreams _cs = null;
float _serverversion = 0f;
String _method = "";
keymon.lat.medicomed.dbrequestmanager._dbresult _table = null;
int _numberofcolumns = 0;
int _i = 0;
Object[] _rowobjects = null;
int _col = 0;
Object _o = null;
int _rows = 0;
RDebugUtils.currentLine=27918336;
 //BA.debugLineNum = 27918336;BA.debugLine="Public Sub HandleJob(Job As HttpJob) As DBResult";
RDebugUtils.currentLine=27918337;
 //BA.debugLineNum = 27918337;BA.debugLine="Dim start As Long = DateTime.Now";
_start = __c.DateTime.getNow();
RDebugUtils.currentLine=27918338;
 //BA.debugLineNum = 27918338;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*/ (null);
RDebugUtils.currentLine=27918339;
 //BA.debugLineNum = 27918339;BA.debugLine="Dim cs As CompressedStreams";
_cs = new anywheresoftware.b4a.randomaccessfile.CompressedStreams();
RDebugUtils.currentLine=27918340;
 //BA.debugLineNum = 27918340;BA.debugLine="In = cs.WrapInputStream(In, \"gzip\")";
_in = _cs.WrapInputStream((java.io.InputStream)(_in.getObject()),"gzip");
RDebugUtils.currentLine=27918341;
 //BA.debugLineNum = 27918341;BA.debugLine="Dim serverVersion As Float = ReadObject(In) 'igno";
_serverversion = (float)(BA.ObjectToNumber(__ref._readobject /*Object*/ (null,_in)));
RDebugUtils.currentLine=27918342;
 //BA.debugLineNum = 27918342;BA.debugLine="Dim method As String = ReadObject(In)";
_method = BA.ObjectToString(__ref._readobject /*Object*/ (null,_in));
RDebugUtils.currentLine=27918343;
 //BA.debugLineNum = 27918343;BA.debugLine="Dim table As DBResult";
_table = new keymon.lat.medicomed.dbrequestmanager._dbresult();
RDebugUtils.currentLine=27918344;
 //BA.debugLineNum = 27918344;BA.debugLine="table.Initialize";
_table.Initialize();
RDebugUtils.currentLine=27918345;
 //BA.debugLineNum = 27918345;BA.debugLine="table.Columns.Initialize";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=27918346;
 //BA.debugLineNum = 27918346;BA.debugLine="table.rows.Initialize";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=27918347;
 //BA.debugLineNum = 27918347;BA.debugLine="table.Tag = Job.Tag";
_table.Tag /*Object*/  = _job._tag /*Object*/ ;
RDebugUtils.currentLine=27918348;
 //BA.debugLineNum = 27918348;BA.debugLine="If jobTagAnterior <> Job.Tag Then LogColor(\"Handl";
if ((__ref._jobtaganterior /*String*/ ).equals(BA.ObjectToString(_job._tag /*Object*/ )) == false) { 
__c.LogImpl("327918348","HandleJob: '"+BA.ObjectToString(_job._tag /*Object*/ )+"'",__c.Colors.Blue);};
RDebugUtils.currentLine=27918349;
 //BA.debugLineNum = 27918349;BA.debugLine="jobTagAnterior = Job.Tag  'Mod por CHV - 211023";
__ref._jobtaganterior /*String*/  = BA.ObjectToString(_job._tag /*Object*/ );
RDebugUtils.currentLine=27918350;
 //BA.debugLineNum = 27918350;BA.debugLine="If method = \"query\" Then";
if ((_method).equals("query")) { 
RDebugUtils.currentLine=27918351;
 //BA.debugLineNum = 27918351;BA.debugLine="Dim numberOfColumns As Int = ReadInt(In)";
_numberofcolumns = __ref._readint /*int*/ (null,_in);
RDebugUtils.currentLine=27918352;
 //BA.debugLineNum = 27918352;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 ) {
RDebugUtils.currentLine=27918353;
 //BA.debugLineNum = 27918353;BA.debugLine="table.Columns.Put(ReadObject(In), i)";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Put(__ref._readobject /*Object*/ (null,_in),(Object)(_i));
 }
};
RDebugUtils.currentLine=27918355;
 //BA.debugLineNum = 27918355;BA.debugLine="Do While ReadByte(In) = 1";
while (__ref._readbyte /*byte*/ (null,_in)==1) {
RDebugUtils.currentLine=27918356;
 //BA.debugLineNum = 27918356;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();
}
}
;
RDebugUtils.currentLine=27918357;
 //BA.debugLineNum = 27918357;BA.debugLine="table.rows.Add(rowObjects)";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_rowobjects));
RDebugUtils.currentLine=27918358;
 //BA.debugLineNum = 27918358;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 ) {
RDebugUtils.currentLine=27918359;
 //BA.debugLineNum = 27918359;BA.debugLine="Dim o As Object = ReadObject(In)";
_o = __ref._readobject /*Object*/ (null,_in);
RDebugUtils.currentLine=27918360;
 //BA.debugLineNum = 27918360;BA.debugLine="rowObjects(col) = o";
_rowobjects[_col] = _o;
 }
};
 }
;
 }else 
{RDebugUtils.currentLine=27918363;
 //BA.debugLineNum = 27918363;BA.debugLine="Else If method = \"batch\" Then";
if ((_method).equals("batch")) { 
RDebugUtils.currentLine=27918364;
 //BA.debugLineNum = 27918364;BA.debugLine="table.Columns.Put(\"AffectedRows\", 0)";
_table.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Put((Object)("AffectedRows"),(Object)(0));
RDebugUtils.currentLine=27918365;
 //BA.debugLineNum = 27918365;BA.debugLine="Dim rows As Int = ReadInt(In)";
_rows = __ref._readint /*int*/ (null,_in);
RDebugUtils.currentLine=27918366;
 //BA.debugLineNum = 27918366;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 ) {
RDebugUtils.currentLine=27918367;
 //BA.debugLineNum = 27918367;BA.debugLine="table.rows.Add(Array As Object(ReadInt(In)))";
_table.Rows /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(new Object[]{(Object)(__ref._readint /*int*/ (null,_in))}));
 }
};
 }}
;
RDebugUtils.currentLine=27918370;
 //BA.debugLineNum = 27918370;BA.debugLine="In.Close";
_in.Close();
RDebugUtils.currentLine=27918372;
 //BA.debugLineNum = 27918372;BA.debugLine="Return table";
if (true) return _table;
RDebugUtils.currentLine=27918373;
 //BA.debugLineNum = 27918373;BA.debugLine="End Sub";
return null;
}
public String  _executecommand(keymon.lat.medicomed.dbrequestmanager __ref,keymon.lat.medicomed.dbrequestmanager._dbcommand _command,Object _tag) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "executecommand", false))
	 {return ((String) Debug.delegate(ba, "executecommand", new Object[] {_command,_tag}));}
RDebugUtils.currentLine=27328512;
 //BA.debugLineNum = 27328512;BA.debugLine="Public Sub ExecuteCommand(Command As DBCommand, Ta";
RDebugUtils.currentLine=27328513;
 //BA.debugLineNum = 27328513;BA.debugLine="ExecuteBatch(Array As DBCommand(Command), Tag)";
__ref._executebatch /*String*/ (null,anywheresoftware.b4a.keywords.Common.ArrayToList(new keymon.lat.medicomed.dbrequestmanager._dbcommand[]{_command}),_tag);
RDebugUtils.currentLine=27328514;
 //BA.debugLineNum = 27328514;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper  _bytestoimage(keymon.lat.medicomed.dbrequestmanager __ref,byte[] _bytes) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "bytestoimage", false))
	 {return ((anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) Debug.delegate(ba, "bytestoimage", new Object[] {_bytes}));}
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
RDebugUtils.currentLine=28114944;
 //BA.debugLineNum = 28114944;BA.debugLine="Public Sub BytesToImage(bytes() As Byte) As Bitmap";
RDebugUtils.currentLine=28114945;
 //BA.debugLineNum = 28114945;BA.debugLine="Dim In As InputStream";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
RDebugUtils.currentLine=28114946;
 //BA.debugLineNum = 28114946;BA.debugLine="In.InitializeFromBytesArray(bytes, 0, bytes.Lengt";
_in.InitializeFromBytesArray(_bytes,(int) (0),_bytes.length);
RDebugUtils.currentLine=28114947;
 //BA.debugLineNum = 28114947;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=28114948;
 //BA.debugLineNum = 28114948;BA.debugLine="bmp.Initialize2(In)";
_bmp.Initialize2((java.io.InputStream)(_in.getObject()));
RDebugUtils.currentLine=28114949;
 //BA.debugLineNum = 28114949;BA.debugLine="Return bmp";
if (true) return _bmp;
RDebugUtils.currentLine=28114950;
 //BA.debugLineNum = 28114950;BA.debugLine="End Sub";
return null;
}
public String  _class_globals(keymon.lat.medicomed.dbrequestmanager __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
RDebugUtils.currentLine=27066368;
 //BA.debugLineNum = 27066368;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=27066369;
 //BA.debugLineNum = 27066369;BA.debugLine="Private mTarget As Object";
_mtarget = new Object();
RDebugUtils.currentLine=27066370;
 //BA.debugLineNum = 27066370;BA.debugLine="Type DBResult (Tag As Object, Columns As Map, Row";
;
RDebugUtils.currentLine=27066371;
 //BA.debugLineNum = 27066371;BA.debugLine="Type DBCommand (Name As String, Parameters() As O";
;
RDebugUtils.currentLine=27066372;
 //BA.debugLineNum = 27066372;BA.debugLine="Private link As String";
_link = "";
RDebugUtils.currentLine=27066373;
 //BA.debugLineNum = 27066373;BA.debugLine="Private bc As ByteConverter";
_bc = new anywheresoftware.b4a.agraham.byteconverter.ByteConverter();
RDebugUtils.currentLine=27066374;
 //BA.debugLineNum = 27066374;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);
RDebugUtils.currentLine=27066376;
 //BA.debugLineNum = 27066376;BA.debugLine="Private VERSION As Float = 0.9";
_version = (float) (0.9);
RDebugUtils.currentLine=27066377;
 //BA.debugLineNum = 27066377;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();
}
}
;
RDebugUtils.currentLine=27066378;
 //BA.debugLineNum = 27066378;BA.debugLine="Dim jobTagAnterior As String = \"\" 'Mod por CHV -";
_jobtaganterior = "";
RDebugUtils.currentLine=27066379;
 //BA.debugLineNum = 27066379;BA.debugLine="End Sub";
return "";
}
public String  _executebatch(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.collections.List _listofcommands,Object _tag) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "executebatch", false))
	 {return ((String) Debug.delegate(ba, "executebatch", new Object[] {_listofcommands,_tag}));}
keymon.lat.medicomed.httpjob _j = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _ms = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out2 = null;
keymon.lat.medicomed.dbrequestmanager._dbcommand _command = null;
RDebugUtils.currentLine=27262976;
 //BA.debugLineNum = 27262976;BA.debugLine="Public Sub ExecuteBatch(ListOfCommands As List, Ta";
RDebugUtils.currentLine=27262977;
 //BA.debugLineNum = 27262977;BA.debugLine="Dim j As HttpJob";
_j = new keymon.lat.medicomed.httpjob();
RDebugUtils.currentLine=27262978;
 //BA.debugLineNum = 27262978;BA.debugLine="Dim ms As OutputStream";
_ms = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
RDebugUtils.currentLine=27262979;
 //BA.debugLineNum = 27262979;BA.debugLine="Dim out2 As OutputStream = StartJob(j,ms, Tag)";
_out2 = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_out2 = __ref._startjob /*anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper*/ (null,_j,_ms,_tag);
RDebugUtils.currentLine=27262980;
 //BA.debugLineNum = 27262980;BA.debugLine="WriteInt(ListOfCommands.Size, out2)";
__ref._writeint /*String*/ (null,_listofcommands.getSize(),_out2);
RDebugUtils.currentLine=27262981;
 //BA.debugLineNum = 27262981;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 = (keymon.lat.medicomed.dbrequestmanager._dbcommand)(group5.Get(index5));
RDebugUtils.currentLine=27262982;
 //BA.debugLineNum = 27262982;BA.debugLine="WriteObject(Command.Name, out2)";
__ref._writeobject /*String*/ (null,(Object)(_command.Name /*String*/ ),_out2);
RDebugUtils.currentLine=27262983;
 //BA.debugLineNum = 27262983;BA.debugLine="WriteList(Command.Parameters, out2)";
__ref._writelist /*String*/ (null,anywheresoftware.b4a.keywords.Common.ArrayToList(_command.Parameters /*Object[]*/ ),_out2);
 }
};
RDebugUtils.currentLine=27262985;
 //BA.debugLineNum = 27262985;BA.debugLine="out2.Close";
_out2.Close();
RDebugUtils.currentLine=27262986;
 //BA.debugLineNum = 27262986;BA.debugLine="j.PostBytes(link & \"?method=batch\", ms.ToBytesArr";
_j._postbytes /*String*/ (null,__ref._link /*String*/ +"?method=batch",_ms.ToBytesArray());
RDebugUtils.currentLine=27262987;
 //BA.debugLineNum = 27262987;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper  _startjob(keymon.lat.medicomed.dbrequestmanager __ref,keymon.lat.medicomed.httpjob _j,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _memorystream,Object _tag) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "startjob", false))
	 {return ((anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper) Debug.delegate(ba, "startjob", new Object[] {_j,_memorystream,_tag}));}
anywheresoftware.b4a.randomaccessfile.CompressedStreams _compress = null;
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
RDebugUtils.currentLine=27394048;
 //BA.debugLineNum = 27394048;BA.debugLine="Private Sub StartJob(j As HttpJob, MemoryStream As";
RDebugUtils.currentLine=27394049;
 //BA.debugLineNum = 27394049;BA.debugLine="j.Initialize(\"DBRequest\", mTarget)";
_j._initialize /*String*/ (null,ba,"DBRequest",__ref._mtarget /*Object*/ );
RDebugUtils.currentLine=27394050;
 //BA.debugLineNum = 27394050;BA.debugLine="j.Tag = Tag";
_j._tag /*Object*/  = _tag;
RDebugUtils.currentLine=27394051;
 //BA.debugLineNum = 27394051;BA.debugLine="MemoryStream.InitializeToBytesArray(0)";
_memorystream.InitializeToBytesArray((int) (0));
RDebugUtils.currentLine=27394052;
 //BA.debugLineNum = 27394052;BA.debugLine="Dim compress As CompressedStreams";
_compress = new anywheresoftware.b4a.randomaccessfile.CompressedStreams();
RDebugUtils.currentLine=27394053;
 //BA.debugLineNum = 27394053;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");
RDebugUtils.currentLine=27394054;
 //BA.debugLineNum = 27394054;BA.debugLine="WriteObject(VERSION, out)";
__ref._writeobject /*String*/ (null,(Object)(__ref._version /*float*/ ),_out);
RDebugUtils.currentLine=27394055;
 //BA.debugLineNum = 27394055;BA.debugLine="Return out";
if (true) return _out;
RDebugUtils.currentLine=27394056;
 //BA.debugLineNum = 27394056;BA.debugLine="End Sub";
return null;
}
public String  _writeint(keymon.lat.medicomed.dbrequestmanager __ref,int _i,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "writeint", false))
	 {return ((String) Debug.delegate(ba, "writeint", new Object[] {_i,_out}));}
byte[] _data = null;
RDebugUtils.currentLine=27721728;
 //BA.debugLineNum = 27721728;BA.debugLine="Private Sub WriteInt(i As Int, out As OutputStream";
RDebugUtils.currentLine=27721729;
 //BA.debugLineNum = 27721729;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
RDebugUtils.currentLine=27721730;
 //BA.debugLineNum = 27721730;BA.debugLine="data = bc.IntsToBytes(Array As Int(i))";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .IntsToBytes(new int[]{_i});
RDebugUtils.currentLine=27721731;
 //BA.debugLineNum = 27721731;BA.debugLine="out.WriteBytes(data, 0, data.Length)";
_out.WriteBytes(_data,(int) (0),_data.length);
RDebugUtils.currentLine=27721732;
 //BA.debugLineNum = 27721732;BA.debugLine="End Sub";
return "";
}
public String  _writeobject(keymon.lat.medicomed.dbrequestmanager __ref,Object _o,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "writeobject", false))
	 {return ((String) Debug.delegate(ba, "writeobject", new Object[] {_o,_out}));}
byte[] _data = null;
boolean _b = false;
RDebugUtils.currentLine=27525120;
 //BA.debugLineNum = 27525120;BA.debugLine="Private Sub WriteObject(o As Object, out As Output";
RDebugUtils.currentLine=27525121;
 //BA.debugLineNum = 27525121;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
RDebugUtils.currentLine=27525122;
 //BA.debugLineNum = 27525122;BA.debugLine="tempArray(0) = o";
__ref._temparray /*Object[]*/ [(int) (0)] = _o;
RDebugUtils.currentLine=27525123;
 //BA.debugLineNum = 27525123;BA.debugLine="If tempArray(0) = Null Then";
if (__ref._temparray /*Object[]*/ [(int) (0)]== null) { 
RDebugUtils.currentLine=27525124;
 //BA.debugLineNum = 27525124;BA.debugLine="out.WriteBytes(Array As Byte(T_NULL), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_null /*byte*/ },(int) (0),(int) (1));
 }else 
{RDebugUtils.currentLine=27525125;
 //BA.debugLineNum = 27525125;BA.debugLine="Else If tempArray(0) Is Short Then";
if (__ref._temparray /*Object[]*/ [(int) (0)] instanceof Short) { 
RDebugUtils.currentLine=27525126;
 //BA.debugLineNum = 27525126;BA.debugLine="out.WriteBytes(Array As Byte(T_SHORT), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_short /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525127;
 //BA.debugLineNum = 27525127;BA.debugLine="data = bc.ShortsToBytes(Array As Short(o))";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .ShortsToBytes(new short[]{(short)(BA.ObjectToNumber(_o))});
 }else 
{RDebugUtils.currentLine=27525128;
 //BA.debugLineNum = 27525128;BA.debugLine="Else If tempArray(0) Is Int Then";
if (__ref._temparray /*Object[]*/ [(int) (0)] instanceof Integer) { 
RDebugUtils.currentLine=27525129;
 //BA.debugLineNum = 27525129;BA.debugLine="out.WriteBytes(Array As Byte(T_INT), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_int /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525130;
 //BA.debugLineNum = 27525130;BA.debugLine="data = bc.IntsToBytes(Array As Int(o))";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .IntsToBytes(new int[]{(int)(BA.ObjectToNumber(_o))});
 }else 
{RDebugUtils.currentLine=27525131;
 //BA.debugLineNum = 27525131;BA.debugLine="Else If tempArray(0) Is Float Then";
if (__ref._temparray /*Object[]*/ [(int) (0)] instanceof Float) { 
RDebugUtils.currentLine=27525132;
 //BA.debugLineNum = 27525132;BA.debugLine="out.WriteBytes(Array As Byte(T_FLOAT), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_float /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525133;
 //BA.debugLineNum = 27525133;BA.debugLine="data = bc.FloatsToBytes(Array As Float(o))";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .FloatsToBytes(new float[]{(float)(BA.ObjectToNumber(_o))});
 }else 
{RDebugUtils.currentLine=27525134;
 //BA.debugLineNum = 27525134;BA.debugLine="Else If tempArray(0) Is Double Then";
if (__ref._temparray /*Object[]*/ [(int) (0)] instanceof Double) { 
RDebugUtils.currentLine=27525135;
 //BA.debugLineNum = 27525135;BA.debugLine="out.WriteBytes(Array As Byte(T_DOUBLE), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_double /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525136;
 //BA.debugLineNum = 27525136;BA.debugLine="data = bc.DoublesToBytes(Array As Double(o))";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .DoublesToBytes(new double[]{(double)(BA.ObjectToNumber(_o))});
 }else 
{RDebugUtils.currentLine=27525137;
 //BA.debugLineNum = 27525137;BA.debugLine="Else If tempArray(0) Is Long Then";
if (__ref._temparray /*Object[]*/ [(int) (0)] instanceof Long) { 
RDebugUtils.currentLine=27525138;
 //BA.debugLineNum = 27525138;BA.debugLine="out.WriteBytes(Array As Byte(T_LONG), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_long /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525139;
 //BA.debugLineNum = 27525139;BA.debugLine="data = bc.LongsToBytes(Array As Long(o))";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .LongsToBytes(new long[]{BA.ObjectToLongNumber(_o)});
 }else 
{RDebugUtils.currentLine=27525140;
 //BA.debugLineNum = 27525140;BA.debugLine="Else If tempArray(0) Is Boolean Then";
if (__ref._temparray /*Object[]*/ [(int) (0)] instanceof Boolean) { 
RDebugUtils.currentLine=27525141;
 //BA.debugLineNum = 27525141;BA.debugLine="out.WriteBytes(Array As Byte(T_BOOLEAN), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_boolean /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525142;
 //BA.debugLineNum = 27525142;BA.debugLine="Dim b As Boolean = 0";
_b = BA.ObjectToBoolean(0);
RDebugUtils.currentLine=27525143;
 //BA.debugLineNum = 27525143;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
RDebugUtils.currentLine=27525144;
 //BA.debugLineNum = 27525144;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 
{RDebugUtils.currentLine=27525145;
 //BA.debugLineNum = 27525145;BA.debugLine="Else If GetType(tempArray(0)) = \"[B\" Then";
if ((__c.GetType(__ref._temparray /*Object[]*/ [(int) (0)])).equals("[B")) { 
RDebugUtils.currentLine=27525146;
 //BA.debugLineNum = 27525146;BA.debugLine="data = o";
_data = (byte[])(_o);
RDebugUtils.currentLine=27525147;
 //BA.debugLineNum = 27525147;BA.debugLine="out.WriteBytes(Array As Byte(T_BLOB), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_blob /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525148;
 //BA.debugLineNum = 27525148;BA.debugLine="WriteInt(data.Length, out)";
__ref._writeint /*String*/ (null,_data.length,_out);
 }else {
RDebugUtils.currentLine=27525150;
 //BA.debugLineNum = 27525150;BA.debugLine="out.WriteBytes(Array As Byte(T_STRING), 0, 1)";
_out.WriteBytes(new byte[]{__ref._t_string /*byte*/ },(int) (0),(int) (1));
RDebugUtils.currentLine=27525151;
 //BA.debugLineNum = 27525151;BA.debugLine="data = bc.StringToBytes(o, \"UTF8\")";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .StringToBytes(BA.ObjectToString(_o),"UTF8");
RDebugUtils.currentLine=27525152;
 //BA.debugLineNum = 27525152;BA.debugLine="WriteInt(data.Length, out)";
__ref._writeint /*String*/ (null,_data.length,_out);
 }}}}}}}}
;
RDebugUtils.currentLine=27525154;
 //BA.debugLineNum = 27525154;BA.debugLine="If data.Length > 0 Then out.WriteBytes(data, 0, d";
if (_data.length>0) { 
_out.WriteBytes(_data,(int) (0),_data.length);};
RDebugUtils.currentLine=27525155;
 //BA.debugLineNum = 27525155;BA.debugLine="End Sub";
return "";
}
public String  _writelist(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.collections.List _parameters,anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "writelist", false))
	 {return ((String) Debug.delegate(ba, "writelist", new Object[] {_parameters,_out}));}
byte[] _data = null;
Object _o = null;
RDebugUtils.currentLine=27459584;
 //BA.debugLineNum = 27459584;BA.debugLine="Private Sub WriteList(Parameters As List, out As O";
RDebugUtils.currentLine=27459585;
 //BA.debugLineNum = 27459585;BA.debugLine="Dim data() As Byte";
_data = new byte[(int) (0)];
;
RDebugUtils.currentLine=27459586;
 //BA.debugLineNum = 27459586;BA.debugLine="If Parameters = Null Or Parameters.IsInitialized";
if (_parameters== null || _parameters.IsInitialized()==__c.False) { 
RDebugUtils.currentLine=27459587;
 //BA.debugLineNum = 27459587;BA.debugLine="Dim Parameters As List";
_parameters = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=27459588;
 //BA.debugLineNum = 27459588;BA.debugLine="Parameters.Initialize";
_parameters.Initialize();
 };
RDebugUtils.currentLine=27459590;
 //BA.debugLineNum = 27459590;BA.debugLine="data = bc.IntsToBytes(Array As Int(Parameters.Siz";
_data = __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .IntsToBytes(new int[]{_parameters.getSize()});
RDebugUtils.currentLine=27459591;
 //BA.debugLineNum = 27459591;BA.debugLine="out.WriteBytes(data, 0, data.Length)";
_out.WriteBytes(_data,(int) (0),_data.length);
RDebugUtils.currentLine=27459592;
 //BA.debugLineNum = 27459592;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);
RDebugUtils.currentLine=27459593;
 //BA.debugLineNum = 27459593;BA.debugLine="WriteObject(o, out)";
__ref._writeobject /*String*/ (null,_o,_out);
 }
};
RDebugUtils.currentLine=27459595;
 //BA.debugLineNum = 27459595;BA.debugLine="End Sub";
return "";
}
public byte[]  _filetobytes(keymon.lat.medicomed.dbrequestmanager __ref,String _dir,String _filename) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "filetobytes", false))
	 {return ((byte[]) Debug.delegate(ba, "filetobytes", new Object[] {_dir,_filename}));}
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
RDebugUtils.currentLine=27983872;
 //BA.debugLineNum = 27983872;BA.debugLine="Public Sub FileToBytes(Dir As String, FileName As";
RDebugUtils.currentLine=27983873;
 //BA.debugLineNum = 27983873;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
RDebugUtils.currentLine=27983874;
 //BA.debugLineNum = 27983874;BA.debugLine="out.InitializeToBytesArray(0)";
_out.InitializeToBytesArray((int) (0));
RDebugUtils.currentLine=27983875;
 //BA.debugLineNum = 27983875;BA.debugLine="Dim In As InputStream = File.OpenInput(Dir, FileN";
_in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_in = __c.File.OpenInput(_dir,_filename);
RDebugUtils.currentLine=27983876;
 //BA.debugLineNum = 27983876;BA.debugLine="File.Copy2(In, out)";
__c.File.Copy2((java.io.InputStream)(_in.getObject()),(java.io.OutputStream)(_out.getObject()));
RDebugUtils.currentLine=27983877;
 //BA.debugLineNum = 27983877;BA.debugLine="out.Close";
_out.Close();
RDebugUtils.currentLine=27983878;
 //BA.debugLineNum = 27983878;BA.debugLine="Return out.ToBytesArray";
if (true) return _out.ToBytesArray();
RDebugUtils.currentLine=27983879;
 //BA.debugLineNum = 27983879;BA.debugLine="End Sub";
return null;
}
public Object  _readobject(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "readobject", false))
	 {return ((Object) Debug.delegate(ba, "readobject", new Object[] {_in}));}
byte[] _data = null;
byte _b = (byte)0;
int _len = 0;
RDebugUtils.currentLine=27590656;
 //BA.debugLineNum = 27590656;BA.debugLine="Private Sub ReadObject(In As InputStream) As Objec";
RDebugUtils.currentLine=27590657;
 //BA.debugLineNum = 27590657;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
RDebugUtils.currentLine=27590658;
 //BA.debugLineNum = 27590658;BA.debugLine="In.ReadBytes(data, 0, 1)";
_in.ReadBytes(_data,(int) (0),(int) (1));
RDebugUtils.currentLine=27590659;
 //BA.debugLineNum = 27590659;BA.debugLine="Select data(0)";
switch (BA.switchObjectToInt(_data[(int) (0)],__ref._t_null /*byte*/ ,__ref._t_short /*byte*/ ,__ref._t_int /*byte*/ ,__ref._t_long /*byte*/ ,__ref._t_float /*byte*/ ,__ref._t_double /*byte*/ ,__ref._t_boolean /*byte*/ ,__ref._t_blob /*byte*/ )) {
case 0: {
RDebugUtils.currentLine=27590661;
 //BA.debugLineNum = 27590661;BA.debugLine="Return Null";
if (true) return __c.Null;
 break; }
case 1: {
RDebugUtils.currentLine=27590663;
 //BA.debugLineNum = 27590663;BA.debugLine="Dim data(2) As Byte";
_data = new byte[(int) (2)];
;
RDebugUtils.currentLine=27590664;
 //BA.debugLineNum = 27590664;BA.debugLine="Return bc.ShortsFromBytes(ReadBytesFully(In, da";
if (true) return (Object)(__ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .ShortsFromBytes(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length))[(int) (0)]);
 break; }
case 2: {
RDebugUtils.currentLine=27590666;
 //BA.debugLineNum = 27590666;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
RDebugUtils.currentLine=27590667;
 //BA.debugLineNum = 27590667;BA.debugLine="Return bc.IntsFromBytes(ReadBytesFully(In, data";
if (true) return (Object)(__ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .IntsFromBytes(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length))[(int) (0)]);
 break; }
case 3: {
RDebugUtils.currentLine=27590669;
 //BA.debugLineNum = 27590669;BA.debugLine="Dim data(8) As Byte";
_data = new byte[(int) (8)];
;
RDebugUtils.currentLine=27590670;
 //BA.debugLineNum = 27590670;BA.debugLine="Return bc.LongsFromBytes(ReadBytesFully(In, dat";
if (true) return (Object)(__ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .LongsFromBytes(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length))[(int) (0)]);
 break; }
case 4: {
RDebugUtils.currentLine=27590672;
 //BA.debugLineNum = 27590672;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
RDebugUtils.currentLine=27590673;
 //BA.debugLineNum = 27590673;BA.debugLine="Return bc.FloatsFromBytes(ReadBytesFully(In, da";
if (true) return (Object)(__ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .FloatsFromBytes(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length))[(int) (0)]);
 break; }
case 5: {
RDebugUtils.currentLine=27590675;
 //BA.debugLineNum = 27590675;BA.debugLine="Dim data(8) As Byte";
_data = new byte[(int) (8)];
;
RDebugUtils.currentLine=27590676;
 //BA.debugLineNum = 27590676;BA.debugLine="Return bc.DoublesFromBytes(ReadBytesFully(In, d";
if (true) return (Object)(__ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .DoublesFromBytes(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length))[(int) (0)]);
 break; }
case 6: {
RDebugUtils.currentLine=27590678;
 //BA.debugLineNum = 27590678;BA.debugLine="Dim b As Byte = ReadByte(In)";
_b = __ref._readbyte /*byte*/ (null,_in);
RDebugUtils.currentLine=27590679;
 //BA.debugLineNum = 27590679;BA.debugLine="Return b = 1";
if (true) return (Object)(_b==1);
 break; }
case 7: {
RDebugUtils.currentLine=27590681;
 //BA.debugLineNum = 27590681;BA.debugLine="Dim len As Int = ReadInt(In)";
_len = __ref._readint /*int*/ (null,_in);
RDebugUtils.currentLine=27590682;
 //BA.debugLineNum = 27590682;BA.debugLine="Dim data(len) As Byte";
_data = new byte[_len];
;
RDebugUtils.currentLine=27590683;
 //BA.debugLineNum = 27590683;BA.debugLine="Return ReadBytesFully(In, data, data.Length)";
if (true) return (Object)(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length));
 break; }
default: {
RDebugUtils.currentLine=27590685;
 //BA.debugLineNum = 27590685;BA.debugLine="Dim len As Int = ReadInt(In)";
_len = __ref._readint /*int*/ (null,_in);
RDebugUtils.currentLine=27590686;
 //BA.debugLineNum = 27590686;BA.debugLine="Dim data(len) As Byte";
_data = new byte[_len];
;
RDebugUtils.currentLine=27590687;
 //BA.debugLineNum = 27590687;BA.debugLine="ReadBytesFully(In, data, data.Length)";
__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length);
RDebugUtils.currentLine=27590688;
 //BA.debugLineNum = 27590688;BA.debugLine="Return BytesToString(data, 0, data.Length, \"UTF";
if (true) return (Object)(__c.BytesToString(_data,(int) (0),_data.length,"UTF8"));
 break; }
}
;
RDebugUtils.currentLine=27590690;
 //BA.debugLineNum = 27590690;BA.debugLine="End Sub";
return null;
}
public int  _readint(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "readint", false))
	 {return ((Integer) Debug.delegate(ba, "readint", new Object[] {_in}));}
byte[] _data = null;
RDebugUtils.currentLine=27787264;
 //BA.debugLineNum = 27787264;BA.debugLine="Private Sub ReadInt(In As InputStream) As Int";
RDebugUtils.currentLine=27787265;
 //BA.debugLineNum = 27787265;BA.debugLine="Dim data(4) As Byte";
_data = new byte[(int) (4)];
;
RDebugUtils.currentLine=27787266;
 //BA.debugLineNum = 27787266;BA.debugLine="Return bc.IntsFromBytes(ReadBytesFully(In, data,";
if (true) return __ref._bc /*anywheresoftware.b4a.agraham.byteconverter.ByteConverter*/ .IntsFromBytes(__ref._readbytesfully /*byte[]*/ (null,_in,_data,_data.length))[(int) (0)];
RDebugUtils.currentLine=27787267;
 //BA.debugLineNum = 27787267;BA.debugLine="End Sub";
return 0;
}
public byte  _readbyte(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "readbyte", false))
	 {return ((Byte) Debug.delegate(ba, "readbyte", new Object[] {_in}));}
byte[] _data = null;
RDebugUtils.currentLine=27852800;
 //BA.debugLineNum = 27852800;BA.debugLine="Private Sub ReadByte(In As InputStream) As Byte";
RDebugUtils.currentLine=27852801;
 //BA.debugLineNum = 27852801;BA.debugLine="Dim data(1) As Byte";
_data = new byte[(int) (1)];
;
RDebugUtils.currentLine=27852802;
 //BA.debugLineNum = 27852802;BA.debugLine="In.ReadBytes(data, 0, 1)";
_in.ReadBytes(_data,(int) (0),(int) (1));
RDebugUtils.currentLine=27852803;
 //BA.debugLineNum = 27852803;BA.debugLine="Return data(0)";
if (true) return _data[(int) (0)];
RDebugUtils.currentLine=27852804;
 //BA.debugLineNum = 27852804;BA.debugLine="End Sub";
return (byte)0;
}
public byte[]  _imagetobytes(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "imagetobytes", false))
	 {return ((byte[]) Debug.delegate(ba, "imagetobytes", new Object[] {_image}));}
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
RDebugUtils.currentLine=28049408;
 //BA.debugLineNum = 28049408;BA.debugLine="Public Sub ImageToBytes(Image As Bitmap) As Byte()";
RDebugUtils.currentLine=28049409;
 //BA.debugLineNum = 28049409;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
RDebugUtils.currentLine=28049410;
 //BA.debugLineNum = 28049410;BA.debugLine="out.InitializeToBytesArray(0)";
_out.InitializeToBytesArray((int) (0));
RDebugUtils.currentLine=28049411;
 //BA.debugLineNum = 28049411;BA.debugLine="Image.WriteToStream(out, 100, \"JPEG\")";
_image.WriteToStream((java.io.OutputStream)(_out.getObject()),(int) (100),BA.getEnumFromString(android.graphics.Bitmap.CompressFormat.class,"JPEG"));
RDebugUtils.currentLine=28049412;
 //BA.debugLineNum = 28049412;BA.debugLine="out.Close";
_out.Close();
RDebugUtils.currentLine=28049413;
 //BA.debugLineNum = 28049413;BA.debugLine="Return out.ToBytesArray";
if (true) return _out.ToBytesArray();
RDebugUtils.currentLine=28049414;
 //BA.debugLineNum = 28049414;BA.debugLine="End Sub";
return null;
}
public String  _printtable(keymon.lat.medicomed.dbrequestmanager __ref,keymon.lat.medicomed.dbrequestmanager._dbresult _table) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "printtable", false))
	 {return ((String) Debug.delegate(ba, "printtable", new Object[] {_table}));}
anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
Object _col = null;
Object[] _row = null;
Object _record = null;
RDebugUtils.currentLine=28180480;
 //BA.debugLineNum = 28180480;BA.debugLine="Public Sub PrintTable(Table As DBResult)";
RDebugUtils.currentLine=28180481;
 //BA.debugLineNum = 28180481;BA.debugLine="Log(\"Tag: \" & Table.Tag & \", Columns: \" & Table.C";
__c.LogImpl("328180481","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);
RDebugUtils.currentLine=28180482;
 //BA.debugLineNum = 28180482;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
RDebugUtils.currentLine=28180483;
 //BA.debugLineNum = 28180483;BA.debugLine="sb.Initialize";
_sb.Initialize();
RDebugUtils.currentLine=28180484;
 //BA.debugLineNum = 28180484;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);
RDebugUtils.currentLine=28180485;
 //BA.debugLineNum = 28180485;BA.debugLine="sb.Append(col).Append(TAB)";
_sb.Append(BA.ObjectToString(_col)).Append(__c.TAB);
 }
};
RDebugUtils.currentLine=28180487;
 //BA.debugLineNum = 28180487;BA.debugLine="Log(sb.ToString)";
__c.LogImpl("328180487",_sb.ToString(),0);
RDebugUtils.currentLine=28180488;
 //BA.debugLineNum = 28180488;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));
RDebugUtils.currentLine=28180489;
 //BA.debugLineNum = 28180489;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
RDebugUtils.currentLine=28180490;
 //BA.debugLineNum = 28180490;BA.debugLine="sb.Initialize";
_sb.Initialize();
RDebugUtils.currentLine=28180491;
 //BA.debugLineNum = 28180491;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];
RDebugUtils.currentLine=28180492;
 //BA.debugLineNum = 28180492;BA.debugLine="sb.Append(record).Append(TAB)";
_sb.Append(BA.ObjectToString(_record)).Append(__c.TAB);
 }
};
RDebugUtils.currentLine=28180494;
 //BA.debugLineNum = 28180494;BA.debugLine="ToastMessageShow(sb.ToString, True)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_sb.ToString()),__c.True);
 }
};
RDebugUtils.currentLine=28180496;
 //BA.debugLineNum = 28180496;BA.debugLine="End Sub";
return "";
}
public byte[]  _readbytesfully(keymon.lat.medicomed.dbrequestmanager __ref,anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in,byte[] _data,int _len) throws Exception{
__ref = this;
RDebugUtils.currentModule="dbrequestmanager";
if (Debug.shouldDelegate(ba, "readbytesfully", false))
	 {return ((byte[]) Debug.delegate(ba, "readbytesfully", new Object[] {_in,_data,_len}));}
int _count = 0;
int _read = 0;
RDebugUtils.currentLine=27656192;
 //BA.debugLineNum = 27656192;BA.debugLine="Private Sub ReadBytesFully(In As InputStream, Data";
RDebugUtils.currentLine=27656193;
 //BA.debugLineNum = 27656193;BA.debugLine="Dim count = 0, read As Int";
_count = (int) (0);
_read = 0;
RDebugUtils.currentLine=27656194;
 //BA.debugLineNum = 27656194;BA.debugLine="Do While count < Len And read > -1";
while (_count<_len && _read>-1) {
RDebugUtils.currentLine=27656195;
 //BA.debugLineNum = 27656195;BA.debugLine="read = In.ReadBytes(Data, count, Len - count)";
_read = _in.ReadBytes(_data,_count,(int) (_len-_count));
RDebugUtils.currentLine=27656196;
 //BA.debugLineNum = 27656196;BA.debugLine="count = count + read";
_count = (int) (_count+_read);
 }
;
RDebugUtils.currentLine=27656198;
 //BA.debugLineNum = 27656198;BA.debugLine="Return Data";
if (true) return _data;
RDebugUtils.currentLine=27656199;
 //BA.debugLineNum = 27656199;BA.debugLine="End Sub";
return null;
}
}