FileReader & FileWriter
Duration: 5 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- About Course: About the Course
- Programming and Data Structures: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling, Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing, Language Design, Intro to Compilers, Visual Basics, Syntax Analysis: Bottom-Up
- C++ and Java Programming: OOPS with C++, Java Fundamentals, Array, String, IO & References, OOPS with Java, Generic & Collections, Multithreading, File Handling & I/O, Java, Object Oriented Technology
- Computer Networks, TCP/IP & Network Security: Introduction to CN, Data Communication, DLL: Flow Control, DLL: Access Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Access Technologies, Network Security, Cloud Computing, Mobile Computing, Net Layer:Routing Protocol, Cyber Safety and Security
- Teaching Methodology / शिक्षण विधि: Growth and Development / वृद्धि और विकास, शिक्षा का अर्थ, उद्देश्य एवं दर्शन / Meaning, Aims and Philosophy of Education, Theories of Development / विकास के सिद्धांत, Inclusive Education / समावेशी शिक्षा, विज्ञान शिक्षणशास्त्र / Science Pedagogy, Assessment and Evaluation / आकलन और मूल्यांकन, Socialisation and Gender / समाजीकरण और जेंडर, शिक्षा, समाज एवं जेंडर / Education, Society and Gender, Cognitive Processes / संज्ञानात्मक प्रक्रियाएँ, Teaching Planning and Teaching Skills / शिक्षण योजना और शिक्षण कौशल, Personality Development / व्यक्तित्व विकास, Teaching Methods / शिक्षण विधियाँ, Learning and Behavioural Theories / अधिगम और व्यवहारवादी सिद्धांत, व्यक्तिगत भिन्नताएँ, क्षमताएँ और व्यक्तित्व / Individual Differences, Abilities and Personality, अभिप्रेरणा और स्वनिर्देशित अधिगम / Motivation and Self-Directed Learning, Teaching Methods and Approaches / शिक्षण विधियाँ एवं उपागम, Teaching-Learning Process and Classroom Management / शिक्षण-अधिगम प्रक्रिया एवं कक्षा प्रबंधन, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री एवं शैक्षिक तकनीकी, Microteaching and Classroom Communication / सूक्ष्म शिक्षण एवं कक्षा संप्रेषण, Assessment and Evaluation / आकलन एवं मूल्यांकन, Curriculum, Arts and Co-curricular Areas / पाठ्यचर्या, कला एवं सह-शैक्षिक क्षेत्र, Education of Children with Disabilities / दिव्यांग बच्चों की शिक्षा, Teacher: Qualities, Professional Ethics and Development / शिक्षक: गुण, व्यावसायिक नैतिकता एवं विकास, समावेशी शिक्षा / Inclusive Education, Social Psychology / सामाजिक मनोविज्ञान, Data Collection and Measurement / आँकड़ा संग्रह एवं मापन, Educational Objectives and Bloom's Taxonomy / शैक्षिक उद्देश्य एवं ब्लूम का वर्गीकरण, Lesson Planning / पाठ योजना, Guidance and Counselling / निर्देशन एवं परामर्श, Educational Psychology / शैक्षिक मनोविज्ञान, Mental Health and Guidance / मानसिक स्वास्थ्य और मार्गदर्शन, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री और शैक्षिक तकनीकी, वाक्य-विचार, लेखन, पत्रकारिता और प्रयोजनमूलक हिंदी, हिंदी शिक्षणशास्त्र, Phonetics and Linguistics, Transformation of Sentences, Writing Skills, Indian, American and World Literature, Foundations of Communication / संचार की मूल अवधारणाएँ, Language, Culture and Nonverbal Signals / भाषा, संस्कृति और अभाषिक संकेत, Listening, Conversation and Communication Skills / श्रवण, वार्तालाप और संचार कौशल, Research: Meaning, Characteristics and Types / शोध: अर्थ, विशेषताएँ एवं प्रकार, Methods of Research and Research Design / शोध विधियाँ एवं अभिकल्प, Research Ethics / शोध नैतिकता, Paper, Article and Academic Events / शोध-पत्र, लेख एवं शैक्षिक आयोजन, अनुक्रम, श्रेणी और संयोजन / Sequences, Series and Combinatorics, आव्यूह और रैखिक बीजगणित / Matrices and Linear Algebra, वास्तविक और सम्मिश्र विश्लेषण / Real and Complex Analysis, Mathematics Pedagogy / गणित शिक्षणशास्त्र, Science and Scientific Inquiry / विज्ञान एवं वैज्ञानिक जाँच, Social Science Pedagogy / सामाजिक विज्ञान शिक्षणशास्त्र, संस्कृतशिक्षणम्, Natural Hazards and Disasters / प्राकृतिक संकट एवं आपदाएँ, Teaching Geography / भूगोल शिक्षण, Pedagogy of Economics / अर्थशास्त्र का शिक्षणशास्त्र, भारतीय राजनीति और जनभागीदारी / Indian Politics and Participation, Molecular Basis of Inheritance / वंशागति का आणविक आधार, Pedagogy of Biology / जीव विज्ञान का शिक्षणशास्त्र, Pedagogy of History / इतिहास शिक्षणशास्त्र, Society, Community and Social Groups / समाज, समुदाय और सामाजिक समूह, Family, Marriage and Kinship / परिवार, विवाह और नातेदारी, Social Stratification and Inequality / सामाजिक स्तरीकरण और असमानता, Physical Education Pedagogy and Inclusion / शारीरिक शिक्षा का शिक्षणशास्त्र एवं समावेशन, Apparel Design and Care / परिधान डिज़ाइन और देखभाल, Extension Education and Development Communication / प्रसार शिक्षा और विकास संचार, Nature, History and Schools of Psychology / मनोविज्ञान का स्वरूप, इतिहास और सम्प्रदाय, Research Methods and Statistics / अनुसंधान विधियाँ और सांख्यिकी, Biological Bases of Behaviour / व्यवहार के जैविक आधार, Sensation, Attention and Perception / संवेदन, अवधान और प्रत्यक्षण, Learning / अधिगम, Thinking, Language, Intelligence and Creativity / चिंतन, भाषा, बुद्धि और सृजनात्मकता, Motivation and Emotion / अभिप्रेरणा और संवेग, Self, Personality and Stress / आत्म, व्यक्तित्व और तनाव, Psychological Disorders / मनोवैज्ञानिक विकार, Therapeutic Approaches / चिकित्सा उपागम, Industrial and Organisational Psychology / औद्योगिक और संगठनात्मक मनोविज्ञान, Fundamentals, Media and Techniques of Art / कला के मूल तत्व, माध्यम और तकनीक, Indian Miniature Painting Schools / भारतीय लघुचित्र शैलियाँ, Modern Western Art / आधुनिक पाश्चात्य कला, Indian and Western Aesthetics / भारतीय और पाश्चात्य सौन्दर्यशास्त्र, Art Pedagogy / कला शिक्षण, Fundamentals of Dance / नृत्य के मूल तत्व, History of Indian Dance and Treatises / नृत्य का इतिहास और शास्त्रीय ग्रंथ, Music Aesthetics and Music Teaching / संगीत सौंदर्यशास्त्र एवं संगीत शिक्षण, General Concepts of Philosophy / दर्शन के सामान्य प्रत्यय, Modern Western Philosophy: Descartes to Hume / आधुनिक पाश्चात्य दर्शन: देकार्त से ह्यूम, Social and Political Philosophy / सामाजिक एवं राजनीतिक दर्शन, Statement-Based Reasoning / कथन आधारित तार्किक विवेचन, Data Sufficiency and Decision Making / आँकड़ों की पर्याप्तता एवं निर्णय क्षमता, Educational Policies, Acts and Administration / शैक्षिक नीतियाँ, अधिनियम एवं प्रशासन, Vocabulary, Sentence Structure and Common Errors, मानव विकास / Human Development
- Digital Electronics / Boolean Logic: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation, Analog-Digital Conversion
- Operating Systems & Linux: Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Threads & Process Creation, Deadlock, Memory Management, Virtual Memory, File Management, Disc Scheduling, Unix OS, Linux OS, Distributed Systems, Windows OS
- Data Base Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, Relational Algebra, SQL, File Organization & Indexing, Transaction Management, Concurrency Control, Database Security & Authorization, Database Recovery, Data Warehousing & Mining
- Internet & Web Technologies: Website, Browser & Services, Internet Fundamentals, Web Design & Development, Protocols & Services, Web Publishing & Hosting, Server Side & Security, Emerging Technologies, HTML Basics, CSS, JavaScript-Basics, .Net Programming, Electronic Data Interchange and E-Commerce, XML, Ajax
- Computer Fundamentals, IT Basics & Architecture: Basics of COA, Cache Memory Organization, Input Output Organisation, Register Transfer and Microoperations, Control Unit Design, Programming the Basic Computer, Instr Formats & Modes, Floating Point Rep
- Python Language: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis
- Software Engineering: Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management, extras, Fundamentals of Systems and Information Systems
- Design & Analysis of Algorithms: Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Advanced Algorithms
- Mathematics - I, II, III, IV / गणित - I, II, III, IV: Permutation and Combination / क्रमचय और संचय, Logarithm / लघुगणक, Linear Algebra / रैखिक बीजगणित, Algebra / बीजगणित, Calculus / कलन, Trigonometry / त्रिकोणमिति, Vectors / सदिश, Set Theory, Functions, Relations, Propositional and Predicate Logic, Research Process Steps / शोध प्रक्रिया के चरण, Graph Theory, Sets, Relations, Functions and Discrete Mathematics / समुच्चय, संबंध, फलन और विविक्त गणित, Number Systems and Number Theory / संख्या पद्धति और संख्या सिद्धांत, Euclidean Geometry and Mensuration / यूक्लिडीय ज्यामिति और क्षेत्रमिति, Statistics and Probability / सांख्यिकी और प्रायिकता, Coordinate Geometry, Vectors and 3D Geometry / निर्देशांक ज्यामिति, सदिश और त्रिविमीय ज्यामिति, Polynomials, Equations and Complex Numbers / बहुपद, समीकरण और सम्मिश्र संख्याएँ, Plane Mensuration / समतल क्षेत्रमिति, Sampling / प्रतिचयन, Percentage / प्रतिशत, Simplification, Indices and Surds / सरलीकरण, घातांक और करणी, Ratio and Proportion / अनुपात और समानुपात
- Computer Graphics, Multimedia & Mobile Computing: Basics of Computer Graphics, 2-D Geometrical Transforms and Viewing, 3-D Object Representation, Geometric Transformations and Viewing, Multimedia
- AI & Emerging Trends: Emerging Trends and AI, Knowledge Representation, Natural Language Processing
- Society, Ethics and Cyber Laws: Society, Law & Ethics, Computer Software, डिजिटल समाज, नैतिकता और साइबर कानून / Digital Society, Ethics and Cyber Law, Digital India and Online Services, Culture, Socialisation and Social Control / संस्कृति, समाजीकरण और सामाजिक नियंत्रण
- Statistical Techniques / सांख्यिकीय तकनीकें: Probability / प्रायिकता, Statistics / सांख्यिकी, Average / औसत, Mixture and Alligation / मिश्रण और एलिगेशन, Simple and Compound Interest / साधारण और चक्रवृद्धि ब्याज, Solid Mensuration / घन क्षेत्रमिति, Number System / संख्या पद्धति, Age Problems / आयु संबंधी प्रश्न, Partnership / साझेदारी
- Interpolation - DI / अंतर्वेशन - DI: Data Interpretation / आँकड़ा निर्वचन
- Basis of Physics / भौतिकी का आधार: Scientific Achievements and Research / वैज्ञानिक उपलब्धियाँ और अनुसंधान, Measurement and Mathematical Methods / मापन और गणितीय विधियाँ, गति और गति के नियम / Motion and Laws of Motion, कार्य, ऊर्जा, शक्ति और घूर्णी गति / Work, Energy, Power and Rotational Motion, Gravitation / गुरुत्वाकर्षण, Mechanical Properties of Matter / पदार्थ के यांत्रिक गुण, Thermal and Statistical Physics / तापीय और सांख्यिकीय भौतिकी, Oscillations and Mechanical Waves / दोलन और यांत्रिक तरंगें, Electrostatics and Current Electricity / स्थिरवैद्युतिकी और धारा विद्युत, Magnetism, Induction and Alternating Current / चुम्बकत्व, प्रेरण और प्रत्यावर्ती धारा, विद्युतचुम्बकीय तरंगें और विकिरण / Electromagnetic Waves and Radiation, Optics and Photonics / प्रकाशिकी और फोटोनिकी, Quantum Physics and Relativity / क्वांटम भौतिकी और आपेक्षिकता, Atoms, Nuclei and Astrophysics / परमाणु, नाभिक और खगोल भौतिकी, Solid State Physics and Electronics / ठोस अवस्था भौतिकी और इलेक्ट्रॉनिकी
- Business Studies and Management / व्यवसाय अध्ययन एवं प्रबंधन: Video Lectures, Business Communication / व्यावसायिक संचार, Principles and Functions of Management / प्रबंध के सिद्धांत एवं कार्य, Accounting Fundamentals and Recording of Transactions / लेखांकन के आधार एवं लेन-देनों का अभिलेखन, Depreciation, Final Accounts and Computerised Accounting / ह्रास, अंतिम खाते व कंप्यूटरीकृत लेखांकन, Knowledge Management & New Economy / ज्ञान प्रबंधन और नई अर्थव्यवस्था, Business Foundations and Entrepreneurship / व्यवसाय के आधार एवं उद्यमिता, Consumer Behaviour and Demand / उपभोक्ता व्यवहार एवं माँग, Internet and Web Services, Introduction to Economics / अर्थशास्त्र का परिचय, Production and Costs / उत्पादन एवं लागत, National Income Accounting / राष्ट्रीय आय लेखांकन, Determination of Income and Employment / आय एवं रोज़गार का निर्धारण, Public Finance and Government Budget / लोक वित्त एवं सरकारी बजट, Economic Growth and Development / आर्थिक संवृद्धि एवं विकास, भारतीय अर्थव्यवस्था / Indian Economy, Consumer Finance, Careers and Entrepreneurship / उपभोक्ता वित्त, करियर और उद्यमिता, Profit, Loss and Discount / लाभ, हानि और बट्टा, Special Accounts / विशेष लेखे, Partnership Accounts / साझेदारी लेखांकन, Company Accounts / कंपनी लेखांकन, Analysis of Financial Statements / वित्तीय विवरणों का विश्लेषण, Cost and Management Accounting / लागत एवं प्रबंध लेखांकन, अंकेक्षण / Auditing, Business Finance, Banking and Financial Markets / व्यावसायिक वित्त, बैंकिंग एवं वित्तीय बाज़ार, Business Law and Taxation / व्यावसायिक विधि एवं कराधान, Business Mathematics and Statistics / व्यावसायिक गणित एवं सांख्यिकी, Banking, Insurance and Financial Markets / बैंकिंग, बीमा एवं वित्तीय बाजार, Sentence Completion (Fill in the blanks)
- MIS / DSS / Expert Systems: Information Systems, MS Office Applications, Terms & Abbreviations
- E-Commerce: Volume - I, Volume - II
- Previous Year Paper:
- Full Mock Test:
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This lecture introduces Java’s FileReader and FileWriter classes from the java.io package for character-based file handling. It contrasts FileReader with FileInputStream, showing that FileReader reads characters from text files while FileInputStream reads bytes. A ReadText.java example uses a try-with-resources block, FileReader fr = new FileReader("b.txt"), and while ((ch = fr.read()) != -1) to print each character, with the console displaying “Java File Handling” matching b.txt. The lecture then covers FileWriter as a class for writing character-based text, using WriteText.java with FileWriter fw = new FileWriter("b.txt") and fw.write("Java File Handling");, producing console output “Text written successfully” and updating b.txt. Finally, AppendText.java demonstrates appending by using new FileWriter("b.txt", true), resulting in “Text appended successfully” and b.txt containing two lines: “Java File Handling” and “Java Programming.”
Chapters
0:00 – 2:00 00:00-02:00
The opening segment introduces FileReader as a java.io class for reading character-based text data, contrasting it with FileInputStream, which reads bytes. On-screen code in ReadText.java shows new FileReader("b.txt") and a loop using fr.read(), while the console displays “Java File Handling.” A separate FileInputStream example uses new FileInputStream("a.txt") and prints “Hello,” with the file-content panel showing line 1 as “Hello.”
2:00 – 5:00 02:00-05:00
The lecture continues by reinforcing the FileReader example, highlighting while ((ch = fr.read()) != -1) and the -1 end-of-file marker. It then transitions to FileWriter, described as a java.io class for writing character-based text and useful for creating readable text files. WriteText.java shows FileWriter fw = new FileWriter("b.txt") and fw.write("Java File Handling");, with the console showing “Text written successfully” and b.txt updated to contain that line.
5:00 – 5:17 05:00-05:17
The final segment demonstrates appending text using FileWriter. AppendText.java uses new FileWriter("b.txt", true) to open the file in append mode, and the console displays “Text appended successfully.” The updated b.txt content shows two lines: “Java File Handling” and “Java Programming,” illustrating that append mode adds text without overwriting existing content.
The central teaching progression moves from reading to writing character-based files. FileReader is presented as the text-oriented alternative to byte-based FileInputStream, with read() returning characters until -1 signals end of file. FileWriter is then introduced for writing text, first by creating or overwriting a file with new FileWriter("b.txt"), then by appending using the boolean constructor argument true. The examples emphasize try/catch or try-with-resources handling of IOException, console confirmation messages, and visible file-content changes. Key exam-relevant distinctions are: FileReader reads characters; FileInputStream reads bytes; FileWriter writes characters; and the second constructor parameter true enables appending rather than overwriting.

