Reference:Java.io.OutputStream
From Triled Wiki
java.io
public abstract class java.io.OutputStream
| java.lang.Object | ||
| java.io.OutputStream | Closeable Flushable | |
Contents |
[edit] Known Direct Subclasses
ByteArrayOutputStream, ChunkedOutputStream, ContentLengthOutputStream, FileOutputStream, FilterOutputStream, IdentityOutputStream, ImageOutputStreamWrapper, ObjectOutputStream, PipedOutputStream[edit] Known Indirect Subclasses
BufferedOutputStream, CheckedOutputStream, CipherOutputStream, DataOutputStream, DeflaterOutputStream, DigestOutputStream, GZIPOutputStream, JarOutputStream, ParcelFileDescriptor.AutoCloseOutputStream, PrintStream, ZipOutputStream
See Also
[edit] Summary
[edit] Public Constructors
| OutputStream () | |||||
| Default constructor. | |||||
[edit] Public Methods
| void | close () | ||||
| Close this OutputStream. | |||||
| void | flush () | ||||
| Flush this OutputStream. | |||||
| void | write (byte[] buffer) | ||||
| Writes the entire contents of the byte array buffer to this OutputStream. | |||||
| abstract | void | write (int oneByte) | |||
| Writes the specified byte oneByte to this OutputStream. | |||||
| void | write (byte[] buffer, int offset, int count) | ||||
| Writes count bytes from the byte array buffer starting at offset to this OutputStream. | |||||
[edit] Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait[edit] Methods inherited from interface java.io.Closeable
close[edit] Methods inherited from interface java.io.Flushable
[edit] Details
[edit] Public Constructors
[edit] public OutputStream()
Default constructor.
[edit] Public Methods
[edit] public void close()
Close this OutputStream. Concrete implementations of this class should free any resources during close. This implementation does nothing.
Throws
| IOException | If an error occurs attempting to close this OutputStream. |
|---|
[edit] public void flush()
Flush this OutputStream. Concrete implementations of this class should ensure any pending writes to the underlying stream are written out when this method is envoked. This implementation does nothing.
Throws
| IOException | If an error occurs attempting to flush this OutputStream. |
|---|
[edit] public void write(byte[] buffer)
Writes the entire contents of the byte array buffer to this OutputStream.
Parameters
| buffer | the buffer to be written |
|---|
Throws
| IOException | If an error occurs attempting to write to this OutputStream. |
|---|
[edit] public abstract void write(int oneByte)
Writes the specified byte oneByte to this OutputStream. Only the low order byte of oneByte is written.
Parameters
| oneByte | the byte to be written |
|---|
Throws
| IOException | If an error occurs attempting to write to this OutputStream. |
|---|
[edit] public void write(byte[] buffer, int offset, int count)
Writes count bytes from the byte array buffer starting at offset to this OutputStream.
Parameters
| buffer | the buffer to be written |
|---|---|
| offset | offset in buffer to get bytes |
| count | number of bytes in buffer to write |
Throws
| IOException | If an error occurs attempting to write to this OutputStream. |
|---|---|
| IndexOutOfBoundsException | If offset or count are outside of bounds. |
[edit] References
- Original documentation page for Android SDK build m5-rc15e - 14 apr 2008 17:27
