Java Reader Read All readAll(Reader rd)

Here you can find the source of readAll(Reader rd)

Description

For reading the JSON

License

Open Source License

Declaration

private static String readAll(Reader rd) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;

import java.io.Reader;

public class Main {
    /**For reading the JSON*/
    private static String readAll(Reader rd) throws IOException {
        StringBuilder sb = new StringBuilder();
        int cp;//from  w w w. j  a v  a 2 s.co  m
        while ((cp = rd.read()) != -1) {
            sb.append((char) cp);
        }
        return sb.toString();
    }
}

Related

  1. readAll(final Reader rd)
  2. readAll(Reader in)
  3. readAll(Reader in)
  4. readAll(Reader rd)
  5. readAll(Reader rd)
  6. readAll(Reader rd)
  7. readAll(Reader reader)
  8. readAll(Reader reader)