{"comment":{"url":"https://api.github.com/repos/patrickatcw/JavaBanco/comments/28180940","html_url":"https://github.com/patrickatcw/JavaBanco/commit/f8064d3def96f3577e74b1b5db52e677c99c40a7#commitcomment-28180940","id":28180940,"user":{"login":"rpmartz","id":1750641,"avatar_url":"https://avatars1.githubusercontent.com/u/1750641?v=4","gravatar_id":"","url":"https://api.github.com/users/rpmartz","html_url":"https://github.com/rpmartz","followers_url":"https://api.github.com/users/rpmartz/followers","following_url":"https://api.github.com/users/rpmartz/following{/other_user}","gists_url":"https://api.github.com/users/rpmartz/gists{/gist_id}","starred_url":"https://api.github.com/users/rpmartz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpmartz/subscriptions","organizations_url":"https://api.github.com/users/rpmartz/orgs","repos_url":"https://api.github.com/users/rpmartz/repos","events_url":"https://api.github.com/users/rpmartz/events{/privacy}","received_events_url":"https://api.github.com/users/rpmartz/received_events","type":"User","site_admin":false},"position":47,"line":50,"path":"src/main/java/com/patrickjones/GsonPrinter.java","commit_id":"f8064d3def96f3577e74b1b5db52e677c99c40a7","created_at":"2018-03-20T17:02:02Z","updated_at":"2018-03-20T17:02:02Z","author_association":"CONTRIBUTOR","body":"The issue is that you’re never actually writing to the file, just creating it. \n\nTake a look at the \"Writing All Bytes or Lines to a File” section at this link: https://docs.oracle.com/javase/tutorial/essential/io/file.html#common <https://docs.oracle.com/javase/tutorial/essential/io/file.html#common>\n\nThere’s a `Files.write(Path path, byte[] data)` method that you can use to write the file. To get a `Path` object, you need to use the `Paths.get(String path)` method to get a path to the file, so you’ll need to combine `workingDirectory` and `filename`, then you’ll have everything you need to write to the file (remember you an convert a `String` to a `byte []` by using the `getBytes()` method.\n\nGive that a shot and let me know how it goes. \n\nRyan\n\n> On Mar 20, 2018, at 12:44 PM, patrickatcw <notifications@github.com> wrote:\n> \n> Hey Ryan,\n> \n> so i updated my branch with some code that is creating a file within the gsonprinter. different than what we had looked at, but could not figure out what to do with those \"3 lines\". \n> \n> so i can create a file, but nothing is going to it. so i need to create some code that will write to that file? been looking at many examples, but nothing seems to be fluent with what i am trying to accomplish. \n> \n> thanks,\n> \n> patrick\n> \n> \n> \n> \n> --------------------------------------------\n> On Fri, 3/16/18, Ryan Martz <notifications@github.com> wrote:\n> \n> Subject: Re: [patrickatcw/JavaBanco] working on method List<BancAccount> createBanAccount, cannot return 2 values (f8064d3)\n> To: \"patrickatcw/JavaBanco\" <JavaBanco@noreply.github.com>\n> Cc: \"patrickatcw\" <pj8392@yahoo.com>, \"Author\" <author@noreply.github.com>\n> Date: Friday, March 16, 2018, 8:55 PM\n> \n> A singletonList()\n> can only have one element. You want to make a regular list.\n> There are two ways:\n> List<BancAccount>\n> accountList = new ArrayList<>();\n> accountList.add(patrick);\n> accountList.add(ryan);\n> There's also a static convenience method\n> on the Arrays class so you could change line 50\n> to Arrays.asList(patrick, ryan) and you'll\n> be cooking with gas.\n> Either way is perfectly valid, so pick the one you like\n> better.\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view\n> it on GitHub, or mute\n> the thread.\n> \n> \n> \n> \n> \n> \n> \n> \n> \n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub <https://github.com/patrickatcw/JavaBanco/commit/f8064d3def96f3577e74b1b5db52e677c99c40a7#commitcomment-28180569>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABq2cclIQcRXivcO1bdxH2uWTBfxx4Caks5tgTHogaJpZM4SumtM>.\n> \n\n"}}
{"actor":{"display_login":"rpmartz"}}