I am downloading an object from a service with jsonObjectRequest and this object contains a byte [] in its properties, but in the class I use to map (in android), it does not let me pick up a byte []. This is the constructor of the class:
public DocumentoObject(JSONObject o)
{
try
{
if(!o.isNull("ID")) this.ID = o.getInt("ID");
if(!o.isNull("Contenido")) this.Contenido = o.get...
}
catch(Exception e)
{
e.printStackTrace();
}
}
in that this.Contenido = o.get...
is where I'm interested in doing o.getByteArray
. Is there any chance to do something like that?
The code of the download is:
jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, uri, parametros, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
DocumentoObject documento = new DocumentoObject(response);
and in that documento
is where I want to get the Contenido
.
Thanks in advance!