Java I/O:  input and output operations in Java

The java.io package consists of output and input streams used to write and read data to files or other output and input sources. By applying the JAVA I/O, we can implement to control the input and output of multimedia data in an e-commerce system. It provides efficient handling of multimedia files.

We can use the Input Streams and Output streams to use Input Stream and Output Stream classes to read from and write to multimedia files.

Output Streams : This is the standard output stream that is used to produce the result of a program on an output device like the computer screen.

 

The Java ImageIO class facilitates simple encoding and decoding of image reading and writing. It allows several utility methods related to image processing. It returns the input stream connected to the normal output of the sub process. By using the ImageInputStreams and ImageOutputStreams,  we can Read and write from file/ InputStream, OutputStream.

ImageReader helps provide an appropriate image reader for a given image writer

ImageWriter returns an image writer corresponding to the given image reader.

A BufferedInputStream is used to handle image data and improve I/O performance, and the buffered image is constructed using the color model of the image data. All buffered image objects have the top left corner coordinate (0, 0) (Java BufferedImage Class, n.d.).

read()  provides the buffered image   as a result of decoding the supplied image input stream .

write () writes an image using an arbitrary ImageWriter that supports the given format to a File.

 

Applets for Dynamic and Interactive E-commerce Experience

 

Applets  allow us to  interact features to web applications and can be executed by browsers for many platforms. It help us provide interactive features to web applications. It’s Web-based deployment allows platform independence.

 

Despite of the traditional web applications , Applets provide a smooth user experience. Once the applet is downloaded and cached and it require less data transfer between server and client,so that applicatoin will be more fast.       

 

The applet enables easy handling of multimedia content such as audio and video.

 

 

Sources:

Java BufferedImage Class. (n.d.). https://www.tutorialspoint.com/java_dip/java_buffered_image.htm

GfG. (2020, November 27). Java Program to Use finally block for Catching Exceptions. GeeksforGeeks. https://www.geeksforgeeks.org/java-program-to-use-finally-block-for-catching-exceptions/

 


Comments