Concatenate & Buffer File in Java

Here we will concatenating and store buffering files in java using BufferedInputClass and BufferedOutputClass. Concatenate: It is possible to concatenate two or more files and save in a different file. In java, by using SequenceInputStream class we can concatenate two or more files. Buffer Files: In java, we can create a buffer to store temporary … Read more

Displaying file properties

Displaying file properties can be easily done in java

Overall, this program demonstrates how to work with files and directories in Java, including checking file properties, creating and deleting files, and setting file permissions. Q: Write a Java Program to read text file

Q: Write a Java Program to Excel file To read … Read more

Reading a text file in Java

For reading a file we have to create a FileReader object. Then we create BufferedReader object of FileReader. If file not found FileReader constructor throws FileNotFoundException. If br.readLine() is not able to read source file it throws IOException.

PHP Working with Directories

Handle a directory there are several functions in PHP language. i. mkdir() ii. opendir() iii. readdir() iv. scandir() v. rmdir() vi. closedir() i. Create Directory Want to create a new folder using PHP then use mkdir(). Only one argument is required the folder name or folder location where want to create the folder. Example

Read more

Byte Streams in Java

In java programming, to perform input and output of 8-bit, Byte stream is used. Most common byte streams classes are, FileInputStream and FileOutputStream. FileInputStream : FileInputStream is used for reads one byte at a time . FileOutputStream : FileOutputStream is used for writes one byte at a time Writing Bytes Example: Write a program, to write a bytes to … Read more

DataInputStream and DataOutputStream for primitive data

In java, a basic input-output stream provides a method for reading & writing bytes or characters in a file. If we want to read-write primitive data types (such as int, float, etc.) then we can use filter classes to filter data in the original stream. DataInputStream & DataOutputStream are two filter classes used for creating … Read more

Displaying directory contents in Java

For listing a directory content in java we use File class and use isDirectory() method to check whether it is directory or not. if directory then we use listFiles().

Reading a file using FileInputStream

Reading a file using FileInputStream To read a file using FileInputStream in Java, follow these steps: Import the necessary packages:

2. Create a FileInputStream object for the file you want to read:

3. Create a buffer array to store the data you read from the file:

4. Use the read method of … Read more

PHP File Handing

File handling is need for any web application so FILE HANDLING is an important part of PHP language. Some task to be done file needs to be processed. PHP have many function handling any kind of normal files. (Liketxt, docx, csv, jpg etc) Handle a file need to know below topics i. File create ii. … Read more

Character Stream I/O in Java

In a java programming, like a Byte stream Character stream is also used for input-output for 16 bit. But Byte streams are used to perform input and output of 8-bit. Most common Character streams classes are, FileReader and FileWriter.  FileReader- FileReader uses for reads two bytes at a time.  FileWriter– FileWriter uses for writes two bytes at a … Read more