|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.IOUtils
public class IOUtils
I/O helper classes.
| Constructor Summary | |
|---|---|
IOUtils()
|
|
| Method Summary | |
|---|---|
static void |
closeQuietly(Closeable closeable)
Closes a closeable resource, catching its IOException. |
static String |
getFileExtension(File file)
Gets the extension off a file's name. |
static byte[] |
toByteArray(InputStream in)
Reads all the bytes from an input stream. |
static byte[] |
toByteArray(InputStream in,
boolean close)
Reads all the bytes from an input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOUtils()
| Method Detail |
|---|
public static String getFileExtension(File file)
file - the file
public static byte[] toByteArray(InputStream in)
throws IOException
in - the input stream
IOException - if there's a problem reading from the input stream
public static byte[] toByteArray(InputStream in,
boolean close)
throws IOException
in - the input streamclose - true to close the input stream when done, false not to
IOException - if there's a problem reading from the input streampublic static void closeQuietly(Closeable closeable)
IOException.
closeable - the resource to close (can be null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||