open has been invoked
explicitly.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private File | |
| private OutputStream | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | LazyFileOutputStream(String
the filename. name)Creates a stream that will eventually write to the file with the given name and replace it. |
| public | LazyFileOutputStream(String
the filename. name, boolean if true append rather than replace. append)Creates a stream that will eventually write to the file with the given name and optionally append to instead of replacing it. |
| public | LazyFileOutputStream(File
the file to create. f)Creates a stream that will eventually write to the file with the given name and replace it. |
| public | LazyFileOutputStream(File
the file to create. file, boolean if true append rather than replace. append)Creates a stream that will eventually write to the file with the given name and optionally append to instead of replacing it. |
| public | LazyFileOutputStream(File
the file to create. file, boolean if true append rather than replace. append, boolean if true create the file even if nothing to write. alwaysCreate)Creates a stream that will eventually write to the file with the given name, optionally append to instead of replacing it, and optionally always create a file (even if zero length). |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| private synchronized void | |
| public void | |
| public void | write(byte[]
the bytearray to write. b)Overrides java. |
| public synchronized void | write(byte[]
the byte array. b, int write from this index. offset, int the number of bytes to write. len)Overrides java. |
| public synchronized void |
| alwaysCreate | back to summary |
|---|---|
| private boolean alwaysCreate | |
| append | back to summary |
|---|---|
| private boolean append | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| file | back to summary |
|---|---|
| private File file | |
| fos | back to summary |
|---|---|
| private OutputStream fos | |
| opened | back to summary |
|---|---|
| private boolean opened | |
| LazyFileOutputStream | back to summary |
|---|---|
| public LazyFileOutputStream(String name) Creates a stream that will eventually write to the file with the given name and replace it.
| |
| LazyFileOutputStream | back to summary |
|---|---|
| public LazyFileOutputStream(String name, boolean append) Creates a stream that will eventually write to the file with the given name and optionally append to instead of replacing it.
| |
| LazyFileOutputStream | back to summary |
|---|---|
| public LazyFileOutputStream(File f) Creates a stream that will eventually write to the file with the given name and replace it.
| |
| LazyFileOutputStream | back to summary |
|---|---|
| public LazyFileOutputStream(File file, boolean append) Creates a stream that will eventually write to the file with the given name and optionally append to instead of replacing it.
| |
| LazyFileOutputStream | back to summary |
|---|---|
| public LazyFileOutputStream(File file, boolean append, boolean alwaysCreate) Creates a stream that will eventually write to the file with the given name, optionally append to instead of replacing it, and optionally always create a file (even if zero length).
| |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Overrides java. Implements java. Close the file.
| |
| ensureOpened | back to summary |
|---|---|
| private synchronized void ensureOpened() throws IOException | |
| open | back to summary |
|---|---|
| public void open() throws IOException Explicitly open the file for writing. Returns silently if the file has already been opened.
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Delegates to the three-arg version.
| |
| write | back to summary |
|---|---|
| public synchronized void write(byte[] b, int offset, int len) throws IOException Overrides java. Write part of a byte array.
| |
| write | back to summary |
|---|---|
| public synchronized void write(int b) throws IOException Implements abstract java. Write a byte.
| |