Sunday 10 March 2013

Constructors


Constructors

InputStreamReader(InputStream)
Declaration:
public InputStreamReader(java.io.InputStream is)
Description:
Create an InputStreamReader that uses the default character encoding.
Parameters:
is - An InputStream
InputStreamReader(InputStream, String)
Declaration:
public InputStreamReader(java.io.InputStream is, java.lang.String enc)
throws UnsupportedEncodingException
Description:
Create an InputStreamReader that uses the named character encoding.
Parameters:
is - An InputStream
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported

Methods
read()
Declaration:
public int read()
throws IOException
Description:
Read a single character.
Overrides: read in class Reader
Returns: The character read, or -1 if the end of the stream has been reached

read(char[], int, int)
52
Throws:
IOException - If an I/O error occurs
read(char[], int, int)
Declaration:
public int read(char[] cbuf, int off, int len)
throws IOException
Description:
Read characters into a portion of an array.
Overrides: read in class Reader
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns: The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

skip(long)
Declaration:
public long skip(long n)
throws IOException
Description:
Skip characters.
Overrides: skip in class Reader
Parameters:
n - The number of characters to skip
Returns: The number of characters actually skipped
Throws:
java.lang.IllegalArgumentException - If n is negative.
IOException - If an I/O error occurs
ready()
Declaration:
public boolean ready()
throws IOException
Description:
Tell whether this stream is ready to be read.
Overrides: ready in class Reader
Returns: True if the next read() is guaranteed not to block for input, false otherwise. Note that returning
false does not guarantee that the next read will block.

Throws:
IOException - If an I/O error occurs
markSupported()
Declaration:
public boolean markSupported()
Description:
Tell whether this stream supports the mark() operation.
Overrides: markSupported in class Reader
Returns: true if and only if this stream supports the mark operation.
mark(int)
Declaration:
public void mark(int readAheadLimit)
throws IOException
Description:
Mark the present position in the stream.
Overrides: mark in class Reader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the
mark. After reading this many characters, attempting to reset the stream may fail.
Throws:
IOException - If the stream does not support mark(), or if some other I/O error occurs
reset()
Declaration:
public void reset()
throws IOException

Description:
Reset the stream.
Overrides: reset in class Reader
Throws:
IOException - If an I/O error occurs
close()
Declaration:
public void close()
throws IOException
Description:
Close the stream. Closing a previously closed stream has no effect.
Overrides: close in class Reader
Throws:
IOException - If an I/O error occurs






No comments:

Post a Comment