Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

MICRO PROJECT

“Copy the content of one file


3to another file”

SUBMITTED BY :

Enroll No. Name of the Student


2201300274 ARUN YASHRAJ
2201300297 GAVIT HARSHAL
2201300319 MAHAJAN KRUSHNA
2201300334 SONAWANE DHIRAJ
23610230291 BHALEKAR SOMNATH

Guided by
S.S.Aage

DEPARTMENT OF COMPUTER
ENGINEERING, GOVERNMENT
POLYTECHNIC, AHMEDNAGAR
(2023-24)

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 1


CERTIFICATE

This is to certify that, Mr.

Enroll No. Name of the Student


2201300274 ARUN YASHRAJ
2201300297 GAVIT HARSHAL
2201300319 MAHAJAN KRUSHNA
2201300334 SONAWANE DHIRAJ
23610230291 BHALEKAR SOMNATH

of Fourth Semester of Diploma in Computer Engineering students has


completed the Micro-Project satisfactorily in Subject “JAVA” during
academic session 2023- 2024 in the practical fulfillment course for Diploma in
Computer Engineering.

Subject Teacher Head of the Dept Principal

S.S.Aage R. J. CHAVAN B.M.KARDILE

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 2


ACKNOWLEDGEMENT

We would like to place on record my deep sense of gratitude to


Dept. of Computer Engineering for their generous guidance, help and
useful suggestions.

We express our sincere gratitude to Prof. R. J. CHAVAN,


Head of Dept. of Computer Engineering, for her stimulating
guidance, continuous encouragement and supervision throughout
the course of present work.

We are extremely thankful to Prof .B.M.KARDILE Principal,


Government Polytechnic, Ahmednagar for providing me
infrastructural facilities to work in, without which this work would not
have been possible.

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 3


Micro–Project Report

“copy content of one file to


another file”

1.0 AIM OF MICRO PROJECT

The aim of our micro project is to copy content from one file to
another

2.0 COURSE OUT COMES ADDRESSED

a. Develop programs using Object Oriented methodology in Java.


b. Apply concept of inheritance for code reusability.
c. Develop programs using multithreading.
d. Implement Exception Handling.
e.Develop programs using graphics and applet.
f. Develop programs for handling 1/0 and file streams.

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 4


3.0 PROPOSED METHODOLOGY

1. Basics: Introduce file handling concepts and streams.


2. Text File I/O: Teach reading and writing text files.
3. Exception Handling: Cover handling file-related exceptions.
4. Manipulation: Discuss copying, renaming, and deleting files.
5. Serialization: Introduce object serialization for data persistence.
6. NIO APIs: Teach asynchronous file I/O operations.
7. Binary File I/O: Cover reading and writing binary data to files.
8. Complex Formats: Discuss processing CSV, XML, and JSON files.
9. Integration: Show how to integrate file operations with databases and web
services.
10. Debugging: Teach debugging and troubleshooting techniques.
11. Project: Assign a practical project for hands-on application.
12. Assessment: Evaluate through quizzes, assignments, and project work.

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 5


4.0 LITERATURE REVIEW

1. Traditional I/O streams like FileInputStream and FileOutputStream offer


a straightforward method.

2. NIO (New I/O) API, introduced in Java 1.4, provides efficient


alternatives with features like channels and buffers.

3. Effective exception handling and error management are essential for


robust file copying.

4. Best practices include using appropriate buffer sizes and minimizing disk
I/O operations.

5. Integration with third-party libraries like Apache Commons IO or


Google Guava can simplify file copying tasks.

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 6


5.0 ACTUAL METHODOLOGY FOLLOWED

. Open input and output streams for the source and destination files.
. Read content from the source file and write it to the destination file in
chunks.
. Close the streams to release system resources.

import java.io.*;

public class FileCopy {


public static void main(String[] args)
{String sourceFilePath = "source.txt";
String destinationFilePath = "destination.txt";

try (FileInputStream inputStream = new


FileInputStream(sourceFilePath);
FileOutputStream outputStream = new
FileOutputStream(destinationFilePath)) {

byte[ ] buffer = new byte[1024];


int bytesRead;

// Read from input stream and write to output stream


while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}

System.out.println("File copied successfully!");


} catch (IOException e) {
System.err.println("An error occurred while copying the file: " +
e.getMessage());
}
}
}
.

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 7


6.0 Advantages :

1. Portability across different platforms.


2. Efficient I/O operations, especially for large files.
3. Simplified coding with high-level abstractions.
4. Robust error handling mechanisms.
5. Enhanced security features.
6. Seamless integration with other Java libraries and external systems.
7. Scalability to handle various file sizes and types.
8. Strong community support for assistance and best practices.

7.0 Disadvantages :

1. Performance overhead due to platform independence and abstraction


layers.
2. Complexity for simple tasks, particularly for beginners.
3. Higher memory consumption, especially for large files.
4. Dependency on external libraries may complicate deployment.
5. Limited low-level control over file operations.
6. Security vulnerabilities if not implemented securely.
7. Requirement of a Java Runtime Environment for deployment.
1.

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 8


8.0 APPLICATIONS

1. Portable: They can run on any platform with a Java Virtual Machine (JVM).
2. Secure: They provide built-in security features like bytecode verification.
3. Robust: They offer strong exception handling and memory management.
4. Scalable: They support multi-threading and distributed computing.
5. Versatile: They are used for web development, desktop applications, mobile
apps, and more.
6. Community-supported: They benefit from a large community for resources
and support.

9.0 ACTION PLAN

Name of
Sr.
Details of Activity Start Date Finished Date Responsible team
No.
members
Searched topic for the micro
1 project 20-01-2024 20-01-2024 All members

Took topics for micro


2 project 28-01-2024 28-01-2024 All members

Discussed the topic with


3 group members and 31-01-2024 31-01-2024 All members
teacher
Collected the required
4 materials 15-02-2024 15-02-2024 All members

Working on micro
5 Project 28-02-2024 08-03-2024 All members

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page 9


10.0 RESOURCES REQUIRED

Name of
Sr.
Resources/ Specifications Qty. Remarks
No.
Material

1 Computer i3-Ram 4gb 1 -

2 Editor J.D.K 1 -

11.0 OUTPUT OF THE PROJECT

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page


12.0 CONCLUSION

In short, Java is a versatile and widely-used programming language


known for its platform independence, robust security features, and
extensive libraries. Despite potential drawbacks like performance
overhead and complexity, it remains a top choice for software
development due to its scalability, reliability, and strong community
support. Overall, Java continues to be a leading language for building
a wide range of applications across various domains.

Subject Teacher
S.S. Aage

DEPARTMENT OF COMPUTER ENGINEERING AND TECHNOLOGY Page

You might also like