Join David Gassner for an in-depth discussion in this video Using buffered streams, part of Advanced Java Programming.
When you're dealing with large text files, it's a good idea to wrap your FileReaders…and FileWriters inside classes that will buffer the operations.…Buffering the read and write operations is a good way of automatically managing memory…so that you're efficiently putting content into memory and taking it out.…It's a pretty simple operation.…You can use the buffered reader and buffered writer classes wrapped around any instance…of a reader or writer such as FileReader and FileWriter.…
I'll demonstrate this in the class BufferedStreams.…In the main application, I'm currently using instances of the FileReader and FileWriter,…but this time I'm going to be reading and writing a much larger file.…Instead of a simple text file with just a paragraph of text, I'm going to read the entire…content of the play Hamlet in XML.…This file that I'll be reading has been provided as a public domain service, and again,…it's the entire content of a very long play.…
You can do the same sort of demonstration with any long text file.…
- Installing Java on Windows and Mac OS X
- Installing Eclipse
- Using new features such as simplified generics
- Working with advanced class structures (member, local inner, etc.)
- Using the Reflection API
- Navigating inheritance trees
- Managing unordered and ordered sets
- Peeking and polling with queues
- Testing and error handling
- Managing files and directories
- Working with I/O streams
- Next steps with Java
Skill Level Advanced
1. Getting Started
2. Java 7 New Features
3. Using Advanced Class Structures
4. Using the Reflection API
5. More of the Collections Framework
6. Testing and Advanced Exception Handling
Using the finally keyword5m 40s
7. Managing Files and Directories in Java 7
8. Working with I/O Streams
9. Working with Multi-threading
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.