Java Input Output Operations
The course is part of this learning path
In this course, we'll learn about the Java Input/Output subject.
- API and Java I/O
- OutputStream Class
- InputStream Class
- Reader Class
- Writer Class
- Serialization, Deserialization, and Non-Serializable objects
- Anyone looking to get Oracle Java Certification
- Those who want to learn the Java Programming language from scratch
- Java developers who want to increase their knowledge
- Beginners with no previous coding experience in Java programming
- Those who want to learn tips and tricks in Oracle Certified Associate – Java SE 8 Programmer certification exams
- No prior knowledge is required about the Java programming language
- Basic computer knowledge
Hi there. In this lesson, we'll talk about the Writer Class. So far, we've talked about the core abstract classes: InputStream, Reader, and OutputStream in the java.io package. Among these classes, InputStream and Reader abstract classes are used to read data while OutputStream class and Writer class are used to write data. If you remember, we said that we can basically transfer data in two ways: byte-based and character-based. While we can transfer byte-based data with InputStream and OutputStream classes, we can transfer character-based data with Reader and Writer classes. We used the InputStream, OutputStream and Reader classes. There is only one Writer class left.
We can write character-based data with the Writer class. The most important contribution of character-based data processing is that it makes it possible to work with international characters. Before Java 1.1, only byte-based data transfer was possible. Therefore, it was not possible to process all kinds of characters. But after Java 1.1, character-based data transfer became possible. Thanks to the Reader and Writer classes. The Writer class is also included in the java.io package and is an abstract class. Subclasses of this class are used to write data. Well-known subclasses are: FileWriter, BufferedWriter, OutputStreamWriter, PipedWriter, CharArrayWriter etc. Yes, after the short explanation, we can now make examples of the Writer class and write data to the file. Let's take a short break here. Let's look at the use of the Writer class in the next lesson. See you in the next lesson.
OAK Academy is made up of tech experts who have been in the sector for years and years and are deeply rooted in the tech world. They specialize in critical areas like cybersecurity, coding, IT, game development, app monetization, and mobile development.