जावा में स्ट्रीम Java Streams in File Handling

स्ट्रीम डेटा को एक जगह से दूसरी जगह ट्रांसफर करने का माध्यम होती है। जावा में स्ट्रीम दो प्रकार की होती है:

1️⃣ Character Stream – कैरेक्टर (2 बाइट यूनिकोड) डेटा के लिए

  • Character Stream → Reader और Writer क्लासेस


2️⃣ Byte Stream – बाइट (8-बिट) डेटा के लिए

  • Byte Stream → InputStream और OutputStream क्लासेस

  • Buffering के लिए → BufferedReader, BufferedWriter, BufferedInputStream, BufferedOutputStream

  • Printing और Formatting के लिए → PrintWriter, PrintStream

  • फ़ाइल में डेटा को स्थायी रूप से सेव कर सकते हैं। बड़ी फाइल्स को पढ़ना और लिखना आसान। स्ट्रीम्स और बफरिंग से परफॉर्मेंस बेहतर। नेटवर्किंग और डेटाबेस ऑपरेशन में डाटा स्ट्रीमिंग आसान।

Comments

Popular posts from this blog

Java program to implement file input stream class to read binary data from image file.

Java program to find length of given string and convert it in to upper or lower case.

Java program to read a text file and displays it's contents on screen.

Java program to check marks out of Bound exception.

Java program to calculate area and perimeter of circle using interfaces.

Java program to check greatest among three numbers where input numbers are given by user.

Java program to merge two text files in to third file.

Java Applet program to draw rectangle and right-aligned oval of orange color.

Concatenating and Buffering Files in Java जावा में फ़ाइलों को जोड़ना और बफर करना