CodeGym /Courses /Java Core /Practice with streams | Level 9 Practice with streams | Level 9 Java Core Level 9 , Lesson 8 Available "Hello, Amigo!" 12 Task Java Core, level 9, lesson 8 Locked Reader wrapper Reader wrapper 6 Task Java Core, level 9, lesson 8 Locked Reader Wrapper 2 Reader Wrapper 2 6 Task Java Core, level 9, lesson 8 Locked Output only digits Output only digits 12 Task Java Core, level 9, lesson 8 Locked Problem solving Problem solving 12 Task Java Core, level 9, lesson 8 Locked Duplicate text Duplicate text Comments (11) TO VIEW ALL COMMENTS OR TO MAKE A COMMENT, GO TO FULL VERSION Thành Black Level 49, Hanoi 4 October 2021 That taks is not at the same time! Ian De Bie Level 28, Austin, United States 21 October 2020 i just used a string to capture the output and then for the fileoutputstream you can call getBytes() on your string, easy peazy... MaGaby2280 Level 41, Guatemala City, Guatemala 31 March 2020 The last one was hard... be aware of the order of commands and converting to byte[]... and than writing it to the fileoutputStream and the console... Henrique Level 41, São Paulo, Brazil 1 July 2020 I only thought about using the "toByteArray()" method because of your comment, and it passed. Thanks! Andrei Level 41 5 February 2021 or when you write to the outputstream you can use getBytes() for the string. Even simpler! Tian Pro Level 23, Cape Town, South Africa 19 February 2020 Last task seems impossible </3 Delonius Level 20, Port Saint Lucie, United States 6 March 2020 If it helps, you can convert the ByteArrayOutputStream to a regular byte[] array by calling outputStream.toByteArray();. From there, you just write from a buffer like you've done a hundred times before in previous levels. LennyMan Level 25, Lucca, Italy 9 January 2021 I suggest to check on google what you can do with ByteArrayOutputStream, has some interesting methods, i used one for this task. Hossein Shams Level 1, Atlanta, United States 8 September 2019 Where's "Ewerton"s comment?!!! Sam Jin Level 23, Cambridge, Australia 16 September 2019 dw mate i'll replace him Andrei Level 41 5 February 2021 you a'right matey? any kangaroooos aroond gea ?😜
GO TO FULL VERSION