public class LazyFileOutputStream extends OutputStream
Constructor and Description |
---|
LazyFileOutputStream(File f)
Create lazy file-based
OutputStream . |
LazyFileOutputStream(File f,
boolean append)
Create lazy file-based
OutputStream where is possible to specify append flag. |
LazyFileOutputStream(String pathName)
Create lazy file-based
OutputStream by converting the given pathname string into an abstract pathname. |
LazyFileOutputStream(String pathName,
boolean append)
Create lazy file-based
OutputStream by converting the given pathname string into an abstract pathname
where is possible to specify append flag. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected FileOutputStream |
outputStream()
This method is the key component of the class, it gets the wrapped FileOutputStream object if already initialized
or if not it generates it in a thread safe way.
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public LazyFileOutputStream(File f)
OutputStream
.f
- as file used for flushing log eventsLazyFileOutputStream(File, boolean)
public LazyFileOutputStream(File f, boolean append)
OutputStream
where is possible to specify append
flag.f
- as file used for flushing log eventsappend
- true
if the file is opened for appendFileOutputStream.append
,
LazyFileOutputStream(File)
public LazyFileOutputStream(String pathName)
OutputStream
by converting the given pathname string into an abstract pathname.pathName
- a pathname stringFile.File(String)
,
LazyFileOutputStream(String, boolean)
public LazyFileOutputStream(String pathName, boolean append)
OutputStream
by converting the given pathname string into an abstract pathname
where is possible to specify append
flag.pathName
- a pathname stringappend
- true
if the file is opened for appendFile.File(String)
,
LazyFileOutputStream(String)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
protected FileOutputStream outputStream() throws FileNotFoundException
FileNotFoundException
- if the file can't be createdCopyright © 2018 Pivotal Software, Inc.. All rights reserved.