{"action":"created","comment":{"url":"https://api.github.com/repos/JakeWharton/u2020/pulls/comments/48731386","id":48731386,"diff_hunk":"@@ -458,22 +456,21 @@ private View findWindow(int hashCode) {\n \n     private boolean listWindows(Socket client) {\n       boolean result = true;\n-      BufferedWriter out = null;\n+      BufferedSink out = null;\n \n       try {\n         mWindowsLock.readLock().lock();\n \n-        OutputStream clientStream = client.getOutputStream();\n-        out = new BufferedWriter(new OutputStreamWriter(clientStream), 8 * 1024);\n+        out = Okio.buffer(Okio.sink(client.getOutputStream()));\n \n         for (Entry<View, String> entry : mWindows.entrySet()) {\n-          out.write(Integer.toHexString(System.identityHashCode(entry.getKey())));\n-          out.write(' ');\n-          out.append(entry.getValue());\n-          out.write('\\n');\n+          out.writeUtf8(Integer.toHexString(System.identityHashCode(entry.getKey())));","path":"src/internalDebug/java/com/jakewharton/u2020/ui/debug/SocketActivityHierarchyServer.java","position":87,"original_position":87,"commit_id":"79ce0d30c5c66914554e5ddf62c84482fd479c4c","original_commit_id":"79ce0d30c5c66914554e5ddf62c84482fd479c4c","user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"body":"You can use `out.writeHexadecimalUnsignedLong` instead of having to call `toHexString`","created_at":"2016-01-04T13:46:18Z","updated_at":"2016-01-04T13:46:18Z","html_url":"https://github.com/JakeWharton/u2020/pull/226#discussion_r48731386","pull_request_url":"https://api.github.com/repos/JakeWharton/u2020/pulls/226","_links":{"self":{"href":"https://api.github.com/repos/JakeWharton/u2020/pulls/comments/48731386"},"html":{"href":"https://github.com/JakeWharton/u2020/pull/226#discussion_r48731386"},"pull_request":{"href":"https://api.github.com/repos/JakeWharton/u2020/pulls/226"}}},"pull_request":{"url":"https://api.github.com/repos/JakeWharton/u2020/pulls/226","id":54958912,"html_url":"https://github.com/JakeWharton/u2020/pull/226","diff_url":"https://github.com/JakeWharton/u2020/pull/226.diff","patch_url":"https://github.com/JakeWharton/u2020/pull/226.patch","issue_url":"https://api.github.com/repos/JakeWharton/u2020/issues/226","number":226,"state":"open","locked":false,"title":"Use Okio instead of java.io.*.","user":{"login":"eungju","id":44826,"avatar_url":"https://avatars.githubusercontent.com/u/44826?v=3","gravatar_id":"","url":"https://api.github.com/users/eungju","html_url":"https://github.com/eungju","followers_url":"https://api.github.com/users/eungju/followers","following_url":"https://api.github.com/users/eungju/following{/other_user}","gists_url":"https://api.github.com/users/eungju/gists{/gist_id}","starred_url":"https://api.github.com/users/eungju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eungju/subscriptions","organizations_url":"https://api.github.com/users/eungju/orgs","repos_url":"https://api.github.com/users/eungju/repos","events_url":"https://api.github.com/users/eungju/events{/privacy}","received_events_url":"https://api.github.com/users/eungju/received_events","type":"User","site_admin":false},"body":"I just replaced java.io.* to Okio.\r\n","created_at":"2016-01-04T10:01:52Z","updated_at":"2016-01-04T13:46:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42477f8564e210547773b93ec3afbf04a9b07d35","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JakeWharton/u2020/pulls/226/commits","review_comments_url":"https://api.github.com/repos/JakeWharton/u2020/pulls/226/comments","review_comment_url":"https://api.github.com/repos/JakeWharton/u2020/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JakeWharton/u2020/issues/226/comments","statuses_url":"https://api.github.com/repos/JakeWharton/u2020/statuses/79ce0d30c5c66914554e5ddf62c84482fd479c4c","head":{"label":"eungju:activity-hierarchy-server-okio","ref":"activity-hierarchy-server-okio","sha":"79ce0d30c5c66914554e5ddf62c84482fd479c4c","user":{"login":"eungju","id":44826,"avatar_url":"https://avatars.githubusercontent.com/u/44826?v=3","gravatar_id":"","url":"https://api.github.com/users/eungju","html_url":"https://github.com/eungju","followers_url":"https://api.github.com/users/eungju/followers","following_url":"https://api.github.com/users/eungju/following{/other_user}","gists_url":"https://api.github.com/users/eungju/gists{/gist_id}","starred_url":"https://api.github.com/users/eungju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eungju/subscriptions","organizations_url":"https://api.github.com/users/eungju/orgs","repos_url":"https://api.github.com/users/eungju/repos","events_url":"https://api.github.com/users/eungju/events{/privacy}","received_events_url":"https://api.github.com/users/eungju/received_events","type":"User","site_admin":false},"repo":{"id":34992708,"name":"u2020","full_name":"eungju/u2020","owner":{"login":"eungju","id":44826,"avatar_url":"https://avatars.githubusercontent.com/u/44826?v=3","gravatar_id":"","url":"https://api.github.com/users/eungju","html_url":"https://github.com/eungju","followers_url":"https://api.github.com/users/eungju/followers","following_url":"https://api.github.com/users/eungju/following{/other_user}","gists_url":"https://api.github.com/users/eungju/gists{/gist_id}","starred_url":"https://api.github.com/users/eungju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eungju/subscriptions","organizations_url":"https://api.github.com/users/eungju/orgs","repos_url":"https://api.github.com/users/eungju/repos","events_url":"https://api.github.com/users/eungju/events{/privacy}","received_events_url":"https://api.github.com/users/eungju/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eungju/u2020","description":"A sample Android app which showcases advanced usage of Dagger among other open source libraries.","fork":true,"url":"https://api.github.com/repos/eungju/u2020","forks_url":"https://api.github.com/repos/eungju/u2020/forks","keys_url":"https://api.github.com/repos/eungju/u2020/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eungju/u2020/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eungju/u2020/teams","hooks_url":"https://api.github.com/repos/eungju/u2020/hooks","issue_events_url":"https://api.github.com/repos/eungju/u2020/issues/events{/number}","events_url":"https://api.github.com/repos/eungju/u2020/events","assignees_url":"https://api.github.com/repos/eungju/u2020/assignees{/user}","branches_url":"https://api.github.com/repos/eungju/u2020/branches{/branch}","tags_url":"https://api.github.com/repos/eungju/u2020/tags","blobs_url":"https://api.github.com/repos/eungju/u2020/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eungju/u2020/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eungju/u2020/git/refs{/sha}","trees_url":"https://api.github.com/repos/eungju/u2020/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eungju/u2020/statuses/{sha}","languages_url":"https://api.github.com/repos/eungju/u2020/languages","stargazers_url":"https://api.github.com/repos/eungju/u2020/stargazers","contributors_url":"https://api.github.com/repos/eungju/u2020/contributors","subscribers_url":"https://api.github.com/repos/eungju/u2020/subscribers","subscription_url":"https://api.github.com/repos/eungju/u2020/subscription","commits_url":"https://api.github.com/repos/eungju/u2020/commits{/sha}","git_commits_url":"https://api.github.com/repos/eungju/u2020/git/commits{/sha}","comments_url":"https://api.github.com/repos/eungju/u2020/comments{/number}","issue_comment_url":"https://api.github.com/repos/eungju/u2020/issues/comments{/number}","contents_url":"https://api.github.com/repos/eungju/u2020/contents/{+path}","compare_url":"https://api.github.com/repos/eungju/u2020/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eungju/u2020/merges","archive_url":"https://api.github.com/repos/eungju/u2020/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eungju/u2020/downloads","issues_url":"https://api.github.com/repos/eungju/u2020/issues{/number}","pulls_url":"https://api.github.com/repos/eungju/u2020/pulls{/number}","milestones_url":"https://api.github.com/repos/eungju/u2020/milestones{/number}","notifications_url":"https://api.github.com/repos/eungju/u2020/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eungju/u2020/labels{/name}","releases_url":"https://api.github.com/repos/eungju/u2020/releases{/id}","created_at":"2015-05-03T16:35:18Z","updated_at":"2015-05-03T16:35:19Z","pushed_at":"2016-01-04T09:54:26Z","git_url":"git://github.com/eungju/u2020.git","ssh_url":"git@github.com:eungju/u2020.git","clone_url":"https://github.com/eungju/u2020.git","svn_url":"https://github.com/eungju/u2020","homepage":"http://parleys.com/play/529bde2ce4b0e619540cc3ae","size":9189,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JakeWharton:master","ref":"master","sha":"5afaf69f15918d84e9b67fcb0e7910b6975c3415","user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"repo":{"id":14393731,"name":"u2020","full_name":"JakeWharton/u2020","owner":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JakeWharton/u2020","description":"A sample Android app which showcases advanced usage of Dagger among other open source libraries.","fork":false,"url":"https://api.github.com/repos/JakeWharton/u2020","forks_url":"https://api.github.com/repos/JakeWharton/u2020/forks","keys_url":"https://api.github.com/repos/JakeWharton/u2020/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JakeWharton/u2020/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JakeWharton/u2020/teams","hooks_url":"https://api.github.com/repos/JakeWharton/u2020/hooks","issue_events_url":"https://api.github.com/repos/JakeWharton/u2020/issues/events{/number}","events_url":"https://api.github.com/repos/JakeWharton/u2020/events","assignees_url":"https://api.github.com/repos/JakeWharton/u2020/assignees{/user}","branches_url":"https://api.github.com/repos/JakeWharton/u2020/branches{/branch}","tags_url":"https://api.github.com/repos/JakeWharton/u2020/tags","blobs_url":"https://api.github.com/repos/JakeWharton/u2020/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JakeWharton/u2020/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JakeWharton/u2020/git/refs{/sha}","trees_url":"https://api.github.com/repos/JakeWharton/u2020/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JakeWharton/u2020/statuses/{sha}","languages_url":"https://api.github.com/repos/JakeWharton/u2020/languages","stargazers_url":"https://api.github.com/repos/JakeWharton/u2020/stargazers","contributors_url":"https://api.github.com/repos/JakeWharton/u2020/contributors","subscribers_url":"https://api.github.com/repos/JakeWharton/u2020/subscribers","subscription_url":"https://api.github.com/repos/JakeWharton/u2020/subscription","commits_url":"https://api.github.com/repos/JakeWharton/u2020/commits{/sha}","git_commits_url":"https://api.github.com/repos/JakeWharton/u2020/git/commits{/sha}","comments_url":"https://api.github.com/repos/JakeWharton/u2020/comments{/number}","issue_comment_url":"https://api.github.com/repos/JakeWharton/u2020/issues/comments{/number}","contents_url":"https://api.github.com/repos/JakeWharton/u2020/contents/{+path}","compare_url":"https://api.github.com/repos/JakeWharton/u2020/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JakeWharton/u2020/merges","archive_url":"https://api.github.com/repos/JakeWharton/u2020/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JakeWharton/u2020/downloads","issues_url":"https://api.github.com/repos/JakeWharton/u2020/issues{/number}","pulls_url":"https://api.github.com/repos/JakeWharton/u2020/pulls{/number}","milestones_url":"https://api.github.com/repos/JakeWharton/u2020/milestones{/number}","notifications_url":"https://api.github.com/repos/JakeWharton/u2020/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JakeWharton/u2020/labels{/name}","releases_url":"https://api.github.com/repos/JakeWharton/u2020/releases{/id}","created_at":"2013-11-14T11:58:23Z","updated_at":"2016-01-04T11:15:39Z","pushed_at":"2016-01-04T13:22:59Z","git_url":"git://github.com/JakeWharton/u2020.git","ssh_url":"git@github.com:JakeWharton/u2020.git","clone_url":"https://github.com/JakeWharton/u2020.git","svn_url":"https://github.com/JakeWharton/u2020","homepage":"http://parleys.com/play/529bde2ce4b0e619540cc3ae","size":11376,"stargazers_count":2956,"watchers_count":2956,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":567,"mirror_url":null,"open_issues_count":12,"forks":567,"open_issues":12,"watchers":2956,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JakeWharton/u2020/pulls/226"},"html":{"href":"https://github.com/JakeWharton/u2020/pull/226"},"issue":{"href":"https://api.github.com/repos/JakeWharton/u2020/issues/226"},"comments":{"href":"https://api.github.com/repos/JakeWharton/u2020/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/JakeWharton/u2020/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/JakeWharton/u2020/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JakeWharton/u2020/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/JakeWharton/u2020/statuses/79ce0d30c5c66914554e5ddf62c84482fd479c4c"}}}}