OutputStream类型:
Subclasses:
, , , , ,
void | () Closes this output stream and releases any system resources associated with this stream. |
void | () Flushes this output stream and forces any buffered output bytes to be written out. |
void | (byte[] b) Writes b.length bytes from the specified byte array to this output stream. |
void | (byte[] b, int off, int len) Writes len bytes from the specified byte array starting at offset off to this output stream. |
abstract void | (int b) Writes the specified byte to this output stream. |
构造器:
( file) Creates a file output stream to write to the file represented by the specified File object. |
( file, boolean append) Creates a file output stream to write to the file represented by the specified File object. |
( fdObj) Creates a file output stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system. |
( name) Creates a file output stream to write to the file with the specified name. |
( name, boolean append) Creates a file output stream to write to the file with the specified name. |
InputStream类型:
int | () Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. |
void | () Closes this input stream and releases any system resources associated with the stream. |
void | (int readlimit) Marks the current position in this input stream. |
boolean | () Tests if this input stream supports the mark and reset methods. |
abstract int | () Reads the next byte of data from the input stream. |
int | (byte[] b) Reads some number of bytes from the input stream and stores them into the buffer array b . |
int | (byte[] b, int off, int len) Reads up to len bytes of data from the input stream into an array of bytes. |
void | () Repositions this stream to the position at the time the mark method was last called on this input stream. |
long | (long n) Skips over and discards n bytes of data from this input stream. |
构造器:
( file) Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system. |
( fdObj) Creates a FileInputStream by using the file descriptor fdObj , which represents an existing connection to an actual file in the file system. |
( name) |
Writer 类:
public abstract class Writer extends implements , ,
| (char c) Appends the specified character to this writer. |
| ( csq) Appends the specified character sequence to this writer. |
| ( csq, int start, int end) Appends a subsequence of the specified character sequence to this writer. |
abstract void | () Closes the stream, flushing it first. |
abstract void | () Flushes the stream. |
void | (char[] cbuf) Writes an array of characters. |
abstract void | (char[] cbuf, int off, int len) Writes a portion of an array of characters. |
void | (int c) Writes a single character. |
void | ( str) Writes a string. |
void | ( str, int off, int len) Writes a portion of a string. |