{"action":"created","comment":{"url":"https://api.github.com/repos/java-course-au/assignments-2/pulls/comments/57511007","id":57511007,"diff_hunk":"@@ -0,0 +1,97 @@\n+package ru.spbau.mit.simpleftp.client;\n+\n+import java.io.IOException;\n+import java.io.PrintStream;\n+import java.net.InetAddress;\n+import java.net.Socket;\n+import java.net.UnknownHostException;\n+import java.nio.file.Path;\n+import java.util.Properties;\n+\n+import ru.spbau.mit.simpleftp.common.MyFtpGetInputStreamResponse;\n+import ru.spbau.mit.simpleftp.common.MyFtpGetResponse;\n+import ru.spbau.mit.simpleftp.common.MyFtpListResponse;\n+import ru.spbau.mit.simpleftp.common.MyFtpRequest;\n+import ru.spbau.mit.simpleftp.etc.ConfigParser;\n+\n+public class MyFtpClient {\n+    private static final String HOST_DEFAULT = \"127.0.0.1\";\n+    private static final int PORT_DEFAULT = 6666;\n+\n+    private String host;\n+    private int port;\n+    private Socket socket;\n+    private MyFtpSocketRequestWriter socketWriter;\n+    private MyFtpSocketResponseReader socketReader;\n+    private PrintStream log;\n+\n+    void parseConfig(Path configPath) throws IOException {\n+        Properties properties = ConfigParser.parseConfig(configPath);\n+        if (properties.containsKey(\"host\")) {\n+            host = properties.getProperty(\"host\");\n+        }\n+        if (properties.containsKey(\"port\")) {\n+            port = Integer.parseInt(properties.getProperty(\"port\"));\n+        }\n+    }\n+\n+    private void setupDefauls() {\n+        host = HOST_DEFAULT;\n+        port = PORT_DEFAULT;\n+    }\n+\n+    public MyFtpClient(Path configPath, PrintStream log) {","path":"src/main/java/ru/spbau/mit/simpleftp/client/MyFtpClient.java","position":43,"original_position":43,"commit_id":"e4da2169c328fa4a691a2c031651c5b0ee6746cd","original_commit_id":"e4da2169c328fa4a691a2c031651c5b0ee6746cd","user":{"login":"dzharkov","id":863207,"avatar_url":"https://avatars.githubusercontent.com/u/863207?v=3","gravatar_id":"","url":"https://api.github.com/users/dzharkov","html_url":"https://github.com/dzharkov","followers_url":"https://api.github.com/users/dzharkov/followers","following_url":"https://api.github.com/users/dzharkov/following{/other_user}","gists_url":"https://api.github.com/users/dzharkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dzharkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzharkov/subscriptions","organizations_url":"https://api.github.com/users/dzharkov/orgs","repos_url":"https://api.github.com/users/dzharkov/repos","events_url":"https://api.github.com/users/dzharkov/events{/privacy}","received_events_url":"https://api.github.com/users/dzharkov/received_events","type":"User","site_admin":false},"body":"Рекомендованное расположение деклараций в классе: константы, поля, конструкторы, методы (внутри групп сортировка по visibility)\r\nКак минимум, private методы должны идти после их использований.\r\n","created_at":"2016-03-26T08:20:54Z","updated_at":"2016-03-26T08:20:54Z","html_url":"https://github.com/java-course-au/assignments-2/pull/31#discussion_r57511007","pull_request_url":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/java-course-au/assignments-2/pulls/comments/57511007"},"html":{"href":"https://github.com/java-course-au/assignments-2/pull/31#discussion_r57511007"},"pull_request":{"href":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31","id":62616846,"html_url":"https://github.com/java-course-au/assignments-2/pull/31","diff_url":"https://github.com/java-course-au/assignments-2/pull/31.diff","patch_url":"https://github.com/java-course-au/assignments-2/pull/31.patch","issue_url":"https://api.github.com/repos/java-course-au/assignments-2/issues/31","number":31,"state":"open","locked":false,"title":"Java02. ДЗ 03, Маркелов Александр, подгруппа 1","user":{"login":"sanya1111","id":8517156,"avatar_url":"https://avatars.githubusercontent.com/u/8517156?v=3","gravatar_id":"","url":"https://api.github.com/users/sanya1111","html_url":"https://github.com/sanya1111","followers_url":"https://api.github.com/users/sanya1111/followers","following_url":"https://api.github.com/users/sanya1111/following{/other_user}","gists_url":"https://api.github.com/users/sanya1111/gists{/gist_id}","starred_url":"https://api.github.com/users/sanya1111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanya1111/subscriptions","organizations_url":"https://api.github.com/users/sanya1111/orgs","repos_url":"https://api.github.com/users/sanya1111/repos","events_url":"https://api.github.com/users/sanya1111/events{/privacy}","received_events_url":"https://api.github.com/users/sanya1111/received_events","type":"User","site_admin":false},"body":"@dzharkov ","created_at":"2016-03-11T23:14:43Z","updated_at":"2016-03-26T08:20:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2aafce5467d1505a51ad73140b10be806d027337","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31/commits","review_comments_url":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31/comments","review_comment_url":"https://api.github.com/repos/java-course-au/assignments-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/java-course-au/assignments-2/issues/31/comments","statuses_url":"https://api.github.com/repos/java-course-au/assignments-2/statuses/e4da2169c328fa4a691a2c031651c5b0ee6746cd","head":{"label":"sanya1111:simpleFtp","ref":"simpleFtp","sha":"e4da2169c328fa4a691a2c031651c5b0ee6746cd","user":{"login":"sanya1111","id":8517156,"avatar_url":"https://avatars.githubusercontent.com/u/8517156?v=3","gravatar_id":"","url":"https://api.github.com/users/sanya1111","html_url":"https://github.com/sanya1111","followers_url":"https://api.github.com/users/sanya1111/followers","following_url":"https://api.github.com/users/sanya1111/following{/other_user}","gists_url":"https://api.github.com/users/sanya1111/gists{/gist_id}","starred_url":"https://api.github.com/users/sanya1111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanya1111/subscriptions","organizations_url":"https://api.github.com/users/sanya1111/orgs","repos_url":"https://api.github.com/users/sanya1111/repos","events_url":"https://api.github.com/users/sanya1111/events{/privacy}","received_events_url":"https://api.github.com/users/sanya1111/received_events","type":"User","site_admin":false},"repo":{"id":52021712,"name":"assignments-2","full_name":"sanya1111/assignments-2","owner":{"login":"sanya1111","id":8517156,"avatar_url":"https://avatars.githubusercontent.com/u/8517156?v=3","gravatar_id":"","url":"https://api.github.com/users/sanya1111","html_url":"https://github.com/sanya1111","followers_url":"https://api.github.com/users/sanya1111/followers","following_url":"https://api.github.com/users/sanya1111/following{/other_user}","gists_url":"https://api.github.com/users/sanya1111/gists{/gist_id}","starred_url":"https://api.github.com/users/sanya1111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanya1111/subscriptions","organizations_url":"https://api.github.com/users/sanya1111/orgs","repos_url":"https://api.github.com/users/sanya1111/repos","events_url":"https://api.github.com/users/sanya1111/events{/privacy}","received_events_url":"https://api.github.com/users/sanya1111/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanya1111/assignments-2","description":"","fork":true,"url":"https://api.github.com/repos/sanya1111/assignments-2","forks_url":"https://api.github.com/repos/sanya1111/assignments-2/forks","keys_url":"https://api.github.com/repos/sanya1111/assignments-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanya1111/assignments-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanya1111/assignments-2/teams","hooks_url":"https://api.github.com/repos/sanya1111/assignments-2/hooks","issue_events_url":"https://api.github.com/repos/sanya1111/assignments-2/issues/events{/number}","events_url":"https://api.github.com/repos/sanya1111/assignments-2/events","assignees_url":"https://api.github.com/repos/sanya1111/assignments-2/assignees{/user}","branches_url":"https://api.github.com/repos/sanya1111/assignments-2/branches{/branch}","tags_url":"https://api.github.com/repos/sanya1111/assignments-2/tags","blobs_url":"https://api.github.com/repos/sanya1111/assignments-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanya1111/assignments-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanya1111/assignments-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanya1111/assignments-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanya1111/assignments-2/statuses/{sha}","languages_url":"https://api.github.com/repos/sanya1111/assignments-2/languages","stargazers_url":"https://api.github.com/repos/sanya1111/assignments-2/stargazers","contributors_url":"https://api.github.com/repos/sanya1111/assignments-2/contributors","subscribers_url":"https://api.github.com/repos/sanya1111/assignments-2/subscribers","subscription_url":"https://api.github.com/repos/sanya1111/assignments-2/subscription","commits_url":"https://api.github.com/repos/sanya1111/assignments-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanya1111/assignments-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanya1111/assignments-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanya1111/assignments-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanya1111/assignments-2/contents/{+path}","compare_url":"https://api.github.com/repos/sanya1111/assignments-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanya1111/assignments-2/merges","archive_url":"https://api.github.com/repos/sanya1111/assignments-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanya1111/assignments-2/downloads","issues_url":"https://api.github.com/repos/sanya1111/assignments-2/issues{/number}","pulls_url":"https://api.github.com/repos/sanya1111/assignments-2/pulls{/number}","milestones_url":"https://api.github.com/repos/sanya1111/assignments-2/milestones{/number}","notifications_url":"https://api.github.com/repos/sanya1111/assignments-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanya1111/assignments-2/labels{/name}","releases_url":"https://api.github.com/repos/sanya1111/assignments-2/releases{/id}","deployments_url":"https://api.github.com/repos/sanya1111/assignments-2/deployments","created_at":"2016-02-18T16:33:35Z","updated_at":"2016-02-18T16:33:35Z","pushed_at":"2016-03-25T13:53:29Z","git_url":"git://github.com/sanya1111/assignments-2.git","ssh_url":"git@github.com:sanya1111/assignments-2.git","clone_url":"https://github.com/sanya1111/assignments-2.git","svn_url":"https://github.com/sanya1111/assignments-2","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"java-course-au:master","ref":"master","sha":"a343da032205961726de4f3c67c9c43b3436ebb9","user":{"login":"java-course-au","id":14248092,"avatar_url":"https://avatars.githubusercontent.com/u/14248092?v=3","gravatar_id":"","url":"https://api.github.com/users/java-course-au","html_url":"https://github.com/java-course-au","followers_url":"https://api.github.com/users/java-course-au/followers","following_url":"https://api.github.com/users/java-course-au/following{/other_user}","gists_url":"https://api.github.com/users/java-course-au/gists{/gist_id}","starred_url":"https://api.github.com/users/java-course-au/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/java-course-au/subscriptions","organizations_url":"https://api.github.com/users/java-course-au/orgs","repos_url":"https://api.github.com/users/java-course-au/repos","events_url":"https://api.github.com/users/java-course-au/events{/privacy}","received_events_url":"https://api.github.com/users/java-course-au/received_events","type":"Organization","site_admin":false},"repo":{"id":51697606,"name":"assignments-2","full_name":"java-course-au/assignments-2","owner":{"login":"java-course-au","id":14248092,"avatar_url":"https://avatars.githubusercontent.com/u/14248092?v=3","gravatar_id":"","url":"https://api.github.com/users/java-course-au","html_url":"https://github.com/java-course-au","followers_url":"https://api.github.com/users/java-course-au/followers","following_url":"https://api.github.com/users/java-course-au/following{/other_user}","gists_url":"https://api.github.com/users/java-course-au/gists{/gist_id}","starred_url":"https://api.github.com/users/java-course-au/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/java-course-au/subscriptions","organizations_url":"https://api.github.com/users/java-course-au/orgs","repos_url":"https://api.github.com/users/java-course-au/repos","events_url":"https://api.github.com/users/java-course-au/events{/privacy}","received_events_url":"https://api.github.com/users/java-course-au/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/java-course-au/assignments-2","description":"","fork":false,"url":"https://api.github.com/repos/java-course-au/assignments-2","forks_url":"https://api.github.com/repos/java-course-au/assignments-2/forks","keys_url":"https://api.github.com/repos/java-course-au/assignments-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/java-course-au/assignments-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/java-course-au/assignments-2/teams","hooks_url":"https://api.github.com/repos/java-course-au/assignments-2/hooks","issue_events_url":"https://api.github.com/repos/java-course-au/assignments-2/issues/events{/number}","events_url":"https://api.github.com/repos/java-course-au/assignments-2/events","assignees_url":"https://api.github.com/repos/java-course-au/assignments-2/assignees{/user}","branches_url":"https://api.github.com/repos/java-course-au/assignments-2/branches{/branch}","tags_url":"https://api.github.com/repos/java-course-au/assignments-2/tags","blobs_url":"https://api.github.com/repos/java-course-au/assignments-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/java-course-au/assignments-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/java-course-au/assignments-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/java-course-au/assignments-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/java-course-au/assignments-2/statuses/{sha}","languages_url":"https://api.github.com/repos/java-course-au/assignments-2/languages","stargazers_url":"https://api.github.com/repos/java-course-au/assignments-2/stargazers","contributors_url":"https://api.github.com/repos/java-course-au/assignments-2/contributors","subscribers_url":"https://api.github.com/repos/java-course-au/assignments-2/subscribers","subscription_url":"https://api.github.com/repos/java-course-au/assignments-2/subscription","commits_url":"https://api.github.com/repos/java-course-au/assignments-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/java-course-au/assignments-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/java-course-au/assignments-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/java-course-au/assignments-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/java-course-au/assignments-2/contents/{+path}","compare_url":"https://api.github.com/repos/java-course-au/assignments-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/java-course-au/assignments-2/merges","archive_url":"https://api.github.com/repos/java-course-au/assignments-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/java-course-au/assignments-2/downloads","issues_url":"https://api.github.com/repos/java-course-au/assignments-2/issues{/number}","pulls_url":"https://api.github.com/repos/java-course-au/assignments-2/pulls{/number}","milestones_url":"https://api.github.com/repos/java-course-au/assignments-2/milestones{/number}","notifications_url":"https://api.github.com/repos/java-course-au/assignments-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/java-course-au/assignments-2/labels{/name}","releases_url":"https://api.github.com/repos/java-course-au/assignments-2/releases{/id}","deployments_url":"https://api.github.com/repos/java-course-au/assignments-2/deployments","created_at":"2016-02-14T14:22:46Z","updated_at":"2016-02-14T14:52:34Z","pushed_at":"2016-03-25T13:53:29Z","git_url":"git://github.com/java-course-au/assignments-2.git","ssh_url":"git@github.com:java-course-au/assignments-2.git","clone_url":"https://github.com/java-course-au/assignments-2.git","svn_url":"https://github.com/java-course-au/assignments-2","homepage":null,"size":397,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":14,"forks":15,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31"},"html":{"href":"https://github.com/java-course-au/assignments-2/pull/31"},"issue":{"href":"https://api.github.com/repos/java-course-au/assignments-2/issues/31"},"comments":{"href":"https://api.github.com/repos/java-course-au/assignments-2/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/java-course-au/assignments-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/java-course-au/assignments-2/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/java-course-au/assignments-2/statuses/e4da2169c328fa4a691a2c031651c5b0ee6746cd"}}}}