Category Archives: Java

Image Processing in Java | Set 9 ( Face Detection )

In the introductory set on Image Processing, BufferedImage class of Java was used for processing images the applications of BufferedImage class is limited to some operations only, i.e, we can modify the R, G, B values of given input image and produce the modified image. For complex image processing such as face/object detection OpenCV library… Read More »

Java.util.zip.ZipOutputStream class in Java

This class implements an output stream filter for writing files in the ZIP file format. Includes support for both compressed and uncompressed entries. Constructor : ZipOutputStream(OutputStream out) : Creates a new ZIP output stream. ZipOutputStream(OutputStream out, Charset charset) : Creates a new ZIP output stream. Methods: void close() : Closes the ZIP output stream as… Read More »

Java.util.zip.InflaterInputStream class in Java

This class implements a stream filter for uncompressing data in the “deflate” compression format. It is also used as the basis for other decompression filters, such as GZIPInputStream. Constructors InflaterInputStream(InputStream in) : Creates a new input stream with a default decompressor and buffer size. InflaterInputStream(InputStream in, Inflater inf) : Creates a new input stream with… Read More »

Java.util.zip.InflaterOutputStream class in Java

This class implements an output stream filter for uncompressing data stored in the “deflate” compression format. Constructors InflaterOutputStream(OutputStream out) : Creates a new output stream with a default decompressor and buffer size. InflaterOutputStream(OutputStream out, Inflater infl) : Creates a new output stream with the specified decompressor and a default buffer size. InflaterOutputStream(OutputStream out, Inflater infl,… Read More »

Java.io.StringBufferInputStream Class in Java

java.io.StringBufferInputStream class helps in creating an Input Stream where, one can read bytes from the string. If we use this class we can only read lower 8 bits of each character present in the string. But if we use ByteArrayInputStream, there is no restriction of reading only lower 8 bits of each character present in… Read More »

Java.io.PushbackReader Class in Java

java.io.PushbackReader is a character-stream reader class that allows characters to be pushed back into the Stream. Declaration: public class PushbackReader extends FilterReader Constructors : PushbackReader(Reader push) : Creates a new Pushback Reader – “push” with a character Pushback buffer. PushbackReader(Reader push, int size) : Creates a new Pushback Reader with a Pushback buffer of a… Read More »

Java.util.zip.DeflaterInputStream class in Java

Implements an input stream filter for compressing data in the “deflate” compression format. Constructor and Description DeflaterInputStream(InputStream in) : Creates a new input stream with a default compressor and buffer size. DeflaterInputStream(InputStream in, Deflater defl) : Creates a new input stream with the specified compressor and a default buffer size. DeflaterInputStream(InputStream in, Deflater defl, int… Read More »

Java.util.zip.DeflaterOutputStream class in Java

Java.util.zip.DeflaterInputStream class in Java This class implements an output stream filter for compressing data in the “deflate” compression format. It is also used as the basis for other types of compression filters, such as GZIPOutputStream. Constructors and Description DeflaterOutputStream(OutputStream out) : Creates a new output stream with a default compressor and buffer size. DeflaterOutputStream(OutputStream out,… Read More »

Generating Password and OTP in Java

You may go through Generate a One Time Password or Unique Identification URL article before this for better understanding. Many a times we forget our passwords and we opt for Forget password option and within no time we get a new password at our registered email-ID or phone no. to login our account. And every… Read More »

Java.io.Printstream Class in Java | Set 2

Java.io.Printstream Class in Java | Set 1 More Methods: PrintStream printf(Locale l, String format, Object… args) : A convenience method to write a formatted string to this output stream using the specified format string and arguments. Syntax :public PrintStream printf(Locale l, String format, Object… args) Parameters: l – The locale to apply during formatting. If… Read More »

Java.io.OutputStream class in Java

This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink. Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output. Constructor and Description OutputStream() : Single… Read More »