{"action":"created","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/2483","repository_url":"https://api.github.com/repos/square/okhttp","labels_url":"https://api.github.com/repos/square/okhttp/issues/2483/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/2483/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/2483/events","html_url":"https://github.com/square/okhttp/issues/2483","id":148605187,"number":2483,"title":"RealBufferedSource throw  IllegalStateException(\"closed\")","user":{"login":"YLBFDEV","id":11615698,"avatar_url":"https://avatars.githubusercontent.com/u/11615698?v=3","gravatar_id":"","url":"https://api.github.com/users/YLBFDEV","html_url":"https://github.com/YLBFDEV","followers_url":"https://api.github.com/users/YLBFDEV/followers","following_url":"https://api.github.com/users/YLBFDEV/following{/other_user}","gists_url":"https://api.github.com/users/YLBFDEV/gists{/gist_id}","starred_url":"https://api.github.com/users/YLBFDEV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YLBFDEV/subscriptions","organizations_url":"https://api.github.com/users/YLBFDEV/orgs","repos_url":"https://api.github.com/users/YLBFDEV/repos","events_url":"https://api.github.com/users/YLBFDEV/events{/privacy}","received_events_url":"https://api.github.com/users/YLBFDEV/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-15T09:15:15Z","updated_at":"2016-04-18T02:58:44Z","closed_at":"2016-04-15T11:39:28Z","body":" When I use the following method\r\n\r\n```java\r\nBufferedSource source = responseBody.source();\r\nsource.request(Long.MAX_VALUE); // Buffer the entire body.\r\nBuffer buffer = source.buffer();\r\n```\r\nhappened RealBufferedSource throw  IllegalStateException(\"closed\")\r\n![Code Error](http://chuantu.biz/t3/12/1460711284x3340469734.png)"},"comment":{"url":"https://api.github.com/repos/square/okhttp/issues/comments/211164642","html_url":"https://github.com/square/okhttp/issues/2483#issuecomment-211164642","issue_url":"https://api.github.com/repos/square/okhttp/issues/2483","id":211164642,"user":{"login":"YLBFDEV","id":11615698,"avatar_url":"https://avatars.githubusercontent.com/u/11615698?v=3","gravatar_id":"","url":"https://api.github.com/users/YLBFDEV","html_url":"https://github.com/YLBFDEV","followers_url":"https://api.github.com/users/YLBFDEV/followers","following_url":"https://api.github.com/users/YLBFDEV/following{/other_user}","gists_url":"https://api.github.com/users/YLBFDEV/gists{/gist_id}","starred_url":"https://api.github.com/users/YLBFDEV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YLBFDEV/subscriptions","organizations_url":"https://api.github.com/users/YLBFDEV/orgs","repos_url":"https://api.github.com/users/YLBFDEV/repos","events_url":"https://api.github.com/users/YLBFDEV/events{/privacy}","received_events_url":"https://api.github.com/users/YLBFDEV/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T02:58:44Z","updated_at":"2016-04-18T02:58:44Z","body":"\r\nI used `inresponseBody.string() `\r\n\r\nbut in ResponseBody\r\n```java\r\npublic final String string() throws IOException {return new String(bytes(), charset().name());}\r\n```\r\n\r\n```java\r\npublic final byte[] bytes() throws IOException {\r\n   ……\r\n    BufferedSource source = source();\r\n    byte[] bytes;\r\n    try {\r\n      bytes = source.readByteArray();\r\n    } finally {\r\n      Util.closeQuietly(source);\r\n    }\r\n ……\r\n    return bytes;\r\n  }\r\n```\r\nHere is closed source then I use RxJavaframework So just out of this question \r\nSo here should not be used  `inresponseBody.string() ` method"}}