|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.util.io.IOUtil
| Constructor Summary | |
IOUtil()
|
|
| Method Summary | |
static byte[] |
readBytes(InputStream in,
int maxBytes)
Reads at most maxBytes bytes from the supplied input stream and returns them as a byte array. |
static byte[] |
readFully(InputStream in)
Fully reads the bytes available from the supplied InputStream and returns these bytes in a byte array. |
static String |
readFully(Reader reader)
Fully reads the characters available from the supplied Reader and returns these characters as a String object. |
static long |
transfer(InputStream in,
OutputStream out)
Transfers all bytes that can be read from in to out. |
static long |
transfer(Reader in,
Writer out)
Transfers all characters that can be read from in to out. |
static long |
writeToFile(InputStream in,
File file)
Writes all bytes from an InputStream to a file. |
static long |
writeToFile(Reader reader,
File file)
Writes all characters from a Reader to a file using the default character encoding. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IOUtil()
| Method Detail |
public static final long transfer(InputStream in,
OutputStream out)
throws IOException
in - The InputStream to read data from.out - The OutputStream to write data to.
IOException
public static final byte[] readFully(InputStream in)
throws IOException
in - The InputStream to read the bytes from.
IOException - If I/O error occurred.
public static final byte[] readBytes(InputStream in,
int maxBytes)
throws IOException
in - The InputStream supplying the bytes.maxBytes - The maximum number of bytes to read from the input
stream.
IOException
public static final long writeToFile(InputStream in,
File file)
throws IOException
in - The InputStream containing the data to write to the
file.file - The file to write the data to.
IOException - If an I/O error occured while trying to write the
data to the file.
public static final long transfer(Reader in,
Writer out)
throws IOException
in - The Reader to read characters from.out - The Writer to write characters to.
IOException
public static final String readFully(Reader reader)
throws IOException
reader - The Reader to read the characters from.
IOException - If I/O error occurred.
public static final long writeToFile(Reader reader,
File file)
throws IOException
reader - The Reader containing the data to write to the
file.file - The file to write the data to.
IOException - If an I/O error occured while trying to write the
data to the file.FileWriter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||