Closeable
, Flushable
, Appendable
, AutoCloseable
TempFileWriter
public class PrivateFileWriter extends FileWriter
FileWriter
that writes to a file that is accessible only to the user.Constructor | Description |
---|---|
PrivateFileWriter(File f) |
Create a FileWriter that writes to a file with permissions so that
only the user has access to its contents.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
delete() |
|
protected void |
ensurePermissions() |
|
File |
getFile() |
Return the associated File object
|
OutputStream |
getOutputStream() |
Returns an output stream for this writer.
|
String |
getPath() |
Return pathname string.
|
void |
write(char[] cbuf) |
|
void |
write(char[] cbuf,
int off,
int len) |
|
void |
write(int c) |
|
void |
write(String str) |
|
void |
write(String str,
int off,
int len) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, append, close, flush, getEncoding
protected static Logger logger
public PrivateFileWriter(File f) throws IOException
IOException
public String getPath()
public File getFile()
public void write(char[] cbuf) throws IOException
write
in class Writer
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class OutputStreamWriter
IOException
public void write(int c) throws IOException
write
in class OutputStreamWriter
IOException
public void write(String str) throws IOException
write
in class Writer
IOException
public void write(String str, int off, int len) throws IOException
write
in class OutputStreamWriter
IOException
protected void ensurePermissions()
public boolean delete()
public OutputStream getOutputStream()
Copyright © 2010-2018 Nikhef / Stichting FOM. All Rights Reserved.