PipedWriter:— The Java.io.PipedWriter piped character-output streams. Syntax for PipedWriter Class declaration: The declaration of java.io.PipedWriter class is as follows: public class PipedWriter extends Writer Indexes of PipedWriter: There … Continued
An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset.
The charset that it uses may be specified by name or may be given explicitly, or the platform’s default charset may be accepted.
Each invocation of a write() method causes the encoding converter to be invoked on the given character(s).
The resulting bytes are accumulated in a buffer before being written to the underlying output stream. The size of this buffer may be specified, but by default it is large enough for most purposes.
Note: The characters passed to the write() methods are not buffered.
LineNumberInputStream class is an input stream filter that provides the added functionality of keeping track of the current line number.
A line is a sequence of bytes ending with a carriage return character (‘\r’), a newline character (‘\n’), or a carriage return character followed immediately by a linefeed character. In all three cases, the line terminating character(s) are returned as a single newline character.
The line number begins at 0, and is incremented by 1 when a read returns a newline character.
FilterWriter class is used for writing filtered character streams. Java.io.FilterWriter class is an abstract class which itself provides default methods that pass all requests to the contained stream.
The Subclasses of FilterWriter should override some of these methods and may also provide additional methods and fields.
FileWriter: FileWriter provides a best way for writing “stream of characters” or “character files”. FileWriter accepts default character encoding and the default byte-buffer size. To specify the default values, this class inherits from the OutputStreamWriter class on a FileOutputStream. … Continued
Android™ brings a entire set of software for mobile devices: an operating system, middleware and vital mobile applications. The field of Android programming is in a full swing right now. And perhaps, we thought it would be cool to start … Continued
Here we explore what is considered by many to be the most important feature added to C++ in recent years: the standard template library (STL). The inclusion of the STL was one of the major efforts that took place during the standardization of … Continued
Lets see some important and interesting programming concepts needed to be known in the coding environment. Virtual functions: Any function with the keyword “virtual” in the declaration is a virtual function e.g virtual int sum(); sum() is a virtual function. Pure … Continued
Image mosaic is an interesting area in the field of Computer vision. For the time being lets ignore about Computer vision and focus only on Image mosaic.Image mosaics are nothing but a collection of minute images that are assembled together in … Continued
Assertions: Assertion is a statement in java that can be used to test our assumptions about the program. Each assertion contains a boolean expression and believed to be true while execution. If it fails, JVM will throw an error named … Continued