Category Archives: Java

Java.util.zip.ZipInputStream class in Java

This class implements an input stream filter for reading files in the ZIP file format. Includes support for both compressed and uncompressed entries. Constructors: ZipInputStream(InputStream in) : Creates a new ZIP input stream. ZipInputStream(InputStream in, Charset charset) : Creates a new ZIP input stream Methods : int available() : Returns 0 after EOF has reached… Read More »

Java.util.jar.JarInputStream class in Java

The JarInputStream class is used to read the contents of a JAR file from any input stream. It extends the class java.util.zip.ZipInputStream with support for reading an optional Manifest entry. The Manifest can be used to store meta-information about the JAR file and its entries. Constructors JarInputStream(InputStream in) : Creates a new JarInputStream and reads… Read More »

Java.util.zip.ZipEntry class in Java

This class is used to represent a ZIP file entry. Constructors ZipEntry(String name) : Creates a new zip entry with the specified name. ZipEntry(ZipEntry e) : Creates a new zip entry with fields taken from the specified zip entry. Methods: Object clone() : Returns a copy of this entry. Syntax :public Object clone() Overrides: clone… Read More »

Java.util.jar.JarEntry class in Java

This class is used to represent a JAR file entry. Constructors : JarEntry(JarEntry je) : Creates a new JarEntry with fields taken from the specified JarEntry object. JarEntry(String name) : Creates a new JarEntry for the specified JAR file entry name. JarEntry(ZipEntry ze) : Creates a new JarEntry with fields taken from the specified ZipEntry… Read More »

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 »