Posts

Showing posts with the label FileInputStream

Byte Stream in Java जावा में बाइट स्ट्रीम

Byte Stream in Java is used to read and write 8-bit binary data like files, images, audio, and video. जावा में बाइट स्ट्रीम का उपयोग 8-बिट बाइनरी डेटा को पढ़ने और लिखने के लिए किया जाता है, जैसे फाइल, इमेज, ऑडियो और वीडियो। बाइट स्ट्रीम दो प्रकार की होती हैं:- InputStream (इनपुट स्ट्रीम) OutputStream (आउटपुट स्ट्रीम) 1️⃣ InputStream (इनपुट स्ट्रीम) InputStream is a superclass that reads data from a source like file, device, or socket. InputStream एक सुपरक्लास है जो डेटा को किसी स्त्रोत (फाइल, डिवाइस, या सॉकेट) से पढ़ती है। 🔹 Common Methods of InputStream Method Description (English) विवरण (Hindi) int read()          Reads next byte of data                       अगली बाइट को पढ़ता है int available() Returns number of available bytes उपलब्ध बाइट्स की संख्या लौटाता है void close() Closes the stream स्ट्रीम को बंद करता है 2️⃣ OutputStream (आउटपुट स्ट्रीम) Outp...

जावा में फ़ाइल हैंडलिंग (Java File Handling in Hindi & English)

File handling in Java allows us to  read and write data permanently  in files. Using Java I/O (Input/Output) streams, we can store data, read it, and even process it efficiently. जावा में फ़ाइल हैंडलिंग हमें डेटा को  स्थायी रूप से सेव और पढ़ने  की सुविधा देती है। जावा I/O (इनपुट/आउटपुट) स्ट्रीम्स की मदद से हम डेटा को स्टोर, पढ़ और प्रोसेस कर सकते हैं। 1️⃣ जावा में स्ट्रीम (Java Streams) A  stream  is a sequence of data. In Java, streams are used to  read and write data  from one location to another (like file, memory, or network). स्ट्रीम  डेटा का एक क्रम होता है। जावा में, स्ट्रीम का उपयोग  डेटा पढ़ने और लिखने  के लिए किया जाता है, जैसे फ़ाइल, मेमोरी या नेटवर्क। Java I/O streams are mainly divided into two types: जावा I/O स्ट्रीम मुख्यतः दो प्रकार की होती हैं: 1️⃣  Character Stream  – कैरेक्टर (2 बाइट यूनिकोड) डेटा के लिए Character Stream →  Reader  और  Writer  क्लासेस 2️⃣  Byte Stream  – बाइ...