Code example for Reader

Methods: close

0
    } 
 
    private <T> T returnTypeFromJson(HttpRequest request, Type toType) throws JsonException {
        Reader reader = request.bufferedReader();
        try { 
            return GSON.fromJson(reader, toType);
        } catch (JsonParseException e) {
            throw new JsonException(e);
        } finally { 
            try { 
                reader.close();
            } catch (IOException ignored) {
                // Ignored 
            } 
        } 
    } 
 
    /** 
     * Get all bootstrap Users that exist on Parse.com 
     * 
     * @return non-null but possibly empty list of bootstrap