java.io
Class FileReader
java.lang.Object
java.io.Reader
java.io.FileReader
public class FileReader
- extends Reader
- Since:
- BlackBerry API [New]
|
Method Summary |
void |
close()
Close the stream. |
int |
read()
Read a single character. |
int |
read(char[] buffer,
int offset,
int length)
Read characters into a portion of an array. |
FileReader
public FileReader(File file)
throws IOException
- Throws:
IOException- Since:
- BlackBerry API [New]
FileReader
public FileReader(String name)
throws IOException
- Throws:
IOException- Since:
- BlackBerry API [New]
read
public int read()
throws IOException
- Description copied from class:
Reader
- Read a single character. This method will block until a character is
available, an I/O error occurs, or the end of the stream is reached.
Subclasses that intend to support efficient single-character input
should override this method.
- Overrides:
read in class Reader
- Returns:
- The character read, as an integer in the range 0 to 65535
(0x00-0xffff), or -1 if the end of the stream has
been reached
- Throws:
IOException - If an I/O error occurs- Since:
- BlackBerry API [New]
read
public int read(char[] buffer,
int offset,
int length)
throws IOException
- Description copied from class:
Reader
- Read characters into a portion of an array. This method will block
until some input is available, an I/O error occurs, or the end of the
stream is reached.
- Specified by:
read in class Reader
- Parameters:
buffer - Destination bufferoffset - Offset at which to start storing characterslength - 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- Since:
- BlackBerry API [New]
close
public void close()
throws IOException
- Description copied from class:
Reader
- Close the stream. Once a stream has been closed, further read(),
ready(), mark(), or reset() invocations will throw an IOException.
Closing a previously-closed stream, however, has no effect.
- Specified by:
close in class Reader
- Throws:
IOException - If an I/O error occurs- Since:
- BlackBerry API [New]
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.