Code example for JSONArray

Methods: optString

    public long optLong(int index) {
        return baseArgs.optLong(index);
    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);
Connect your IDE to all the code out there  Get Codota for Java