Code example for JSONArray

Methods: isNull

0
    public String optString(int index) {
        return baseArgs.optString(index);
    } 
 
    public boolean isNull(int index) {
        return baseArgs.isNull(index);
    } 
 
 
    // The interesting custom helpers. 
    public byte[] getArrayBuffer(int index) throws JSONException {
        String encoded = baseArgs.getString(index);
        return Base64.decode(encoded, Base64.DEFAULT);
    } 
}