Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHarry James
14,780 PointsMethod that should be in the Teacher Notes
Evan talks about the copyFile() method that should be in the Teacher Notes however, it seems as though it isn't!
Here's the method for easy copying/pasting for any students that want to use it:
private static void copyFile(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[1024];
int read;
while((read = in.read(buffer)) != -1) {
out.write(buffer, 0, read);
}
}
Hope it helps! :)
Jacob Bergdahl
29,119 PointsThank you, Harry. I think that was pretty sloppy of Evan to not make sure that it was there. Especially since it's been at least five months, probably more, since.
Nasir Mahamoud
22,892 PointsThanks Harry!
Sexual Potatoes
12,051 PointsThanks. This course is a mess.
4 Answers
Harry James
14,780 PointsMarking as resolved
Susan Jensen
15,190 PointsThank you for posting this. Not only is it not posted in the teacher notes, the video also runs off the screen and you can't see the { you need... but you can't get to the treehouse community forum on the app on the phone, so I wound up finding the code on Stack Overflow.
Ni Yao
3,852 Points2 years later and the notes still haven't been fixed.
While it is resolved, Treehouse needs to fix it as having every single person who pass through here spend even 15 secs to find it is wasting a huge amount of cumulative human hours.
ilyas kerbal
18,816 PointsThis course is a mess.
Taylor Bryant
7,395 PointsSusan Jensen , looking the code up to find out what it you need is a learning experience itself, congratulations. You will find yourself doing that plenty of times during the process of coding apps.
peter doherty
6,690 PointsThanks, Harry James.
Why hasn't this method been added to the teacher's notes, Treehouse?
Noah Schill
10,020 PointsNoah Schill
10,020 PointsThanks m8