public class FileUtil
extends java.lang.Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
makePrivateRW(java.io.File file)
Create the identified file (if necessary) and give just the owner read-write access.
|
static java.io.File |
makePrivateRW(java.lang.String filename)
Create the named file (if necessary) and give just the owner read-write access.
|
static byte[] |
readBytes(java.io.InputStream in)
Read all bytes from the input stream.
|
static PyFile |
wrap(java.io.InputStream is)
Creates a PyFile in text mode that reads from the given
InputStream. |
static PyFile |
wrap(java.io.InputStream is,
int bufsize)
Creates a PyFile in text mode that reads from the given
InputStream
using bufsize. |
static PyFile |
wrap(java.io.InputStream is,
java.lang.String mode)
Creates a PyFile with mode that reads from the
InputStream. |
static PyFile |
wrap(java.io.InputStream is,
java.lang.String mode,
int bufsize)
Creates a PyFile with mode that reads from the given
InputStream using bufsize. |
static PyFile |
wrap(java.io.OutputStream os)
Creates a PyFile in text mode that writes to the given
OutputStream. |
static PyFile |
wrap(java.io.OutputStream os,
int bufsize)
Creates a PyFile in text mode that writes to the given
OutputStream
with bufsize. |
static PyFile |
wrap(java.io.OutputStream os,
java.lang.String mode)
Creates a PyFile with mode that writes to the given
OutputStream |
static PyFile |
wrap(java.io.OutputStream os,
java.lang.String mode,
int bufsize)
Creates a PyFile with mode that writes to the given
OutputStream with the
given bufsize. |
public static PyFile wrap(java.io.InputStream is, java.lang.String mode, int bufsize)
InputStream using bufsize.public static PyFile wrap(java.io.InputStream is, java.lang.String mode)
InputStream.public static PyFile wrap(java.io.InputStream is, int bufsize)
InputStream
using bufsize.public static PyFile wrap(java.io.InputStream is)
InputStream.public static PyFile wrap(java.io.OutputStream os, java.lang.String mode, int bufsize)
OutputStream with the
given bufsize.public static PyFile wrap(java.io.OutputStream os, java.lang.String mode)
OutputStreampublic static PyFile wrap(java.io.OutputStream os, int bufsize)
OutputStream
with bufsize.public static PyFile wrap(java.io.OutputStream os)
OutputStream.public static byte[] readBytes(java.io.InputStream in)
throws java.io.IOException
Note that using this method to read very large streams could cause out-of-memory exceptions and/or block for large periods of time.
java.io.IOExceptionpublic static java.io.File makePrivateRW(java.lang.String filename)
throws java.io.IOException
filename - to create/controlFile object for subsequent openjava.io.IOExceptionpublic static java.io.File makePrivateRW(java.io.File file)
throws java.io.IOException
file - to create/controlFile object for subsequent openjava.io.IOException