Menu Bar

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, 18 May 2017

What is LineNumberInputStream In Java ?

Class LineNumberInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

Deprecated. 
This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.

@Deprecated
public class LineNumberInputStream

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.

Constructor Summary of LineNumberInputStream:

Constructor
Description
LineNumberInputStream(InputStream in)
Deprecated.
Constructs a newline number input stream that reads its input from the specified input stream.

Method Summary of LineNumberInputStream:

Modifier
Method Name
Description
int
available()
Deprecated.
Returns the number of bytes that can be read from this input stream without blocking.
int
getLineNumber()
Deprecated.
Returns the current line number.
void
mark(int readlimit)
Deprecated.
Marks the current position in this input stream.
int
read()
Deprecated.
Reads the next byte of data from this input stream.
int
read(byte[] b, int off, int len)
Deprecated.
Reads up to len bytes of data from this input stream into an array of bytes.
void
reset()
Deprecated.
Repositions this stream to the position at the time the mark method was last called on this input stream.
void
setLineNumber(int lineNumber)
Deprecated.
Sets the line number to the specified argument.
long
skip(long n)
Deprecated.
Skips over and discards n bytes of data from this input stream.

      
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

Share this Blog with yours Friends !!

No comments:

Post a Comment