* @param inputStream has the returns from the database <br/>
* @throws LazyException
*/
private static void readReturnValues(LazyAnswer lazyAnswer, InputStream inputStream)
{
JSONArray jsonArr = null;
if(!lazyAnswer.hasError() && inputStream != null )
{
//convert response to string
try
{
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream,"utf-8"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
String result = "";
while ((line = reader.readLine()) != null)
{
sb.append(line);
//System.out.println("line: "+line);
}
inputStream.close();
result=sb.toString();
if(!result.equals("") && result.length()>0 && result.indexOf("[") != -1)
{
result = result.substring(result.indexOf("["),result.length());
jsonArr = new JSONArray(result);
// System.out.println("in#: "+jsonArr.toString());
jsonArr = cryptor.jsonArrayDecrypt(jsonArr);
// System.out.println("in: "+jsonArr.toString());
}
else