|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nostra13.universalimageloader.utils.IoUtils
public final class IoUtils
Provides I/O operations
Nested Class Summary | |
---|---|
static interface |
IoUtils.CopyListener
Listener and controller for copy process |
Field Summary | |
---|---|
static int |
CONTINUE_LOADING_PERCENTAGE
75 |
static int |
DEFAULT_BUFFER_SIZE
32768 |
static int |
DEFAULT_IMAGE_TOTAL_SIZE
512000 |
Method Summary | |
---|---|
static void |
closeSilently(Closeable closeable)
|
static boolean |
copyStream(InputStream is,
OutputStream os,
IoUtils.CopyListener listener)
Copies stream, fires progress events by listener, can be interrupted by listener. |
static boolean |
copyStream(InputStream is,
OutputStream os,
IoUtils.CopyListener listener,
int bufferSize)
Copies stream, fires progress events by listener, can be interrupted by listener. |
static void |
readAndCloseStream(InputStream is)
Reads all data from stream and close it silently |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_IMAGE_TOTAL_SIZE
public static final int CONTINUE_LOADING_PERCENTAGE
Method Detail |
---|
public static boolean copyStream(InputStream is, OutputStream os, IoUtils.CopyListener listener) throws IOException
is
- Input streamos
- Output streamlistener
- null-ok; Listener of copying progress and controller of copying interrupting
IOException
public static boolean copyStream(InputStream is, OutputStream os, IoUtils.CopyListener listener, int bufferSize) throws IOException
is
- Input streamos
- Output streamlistener
- null-ok; Listener of copying progress and controller of copying interruptingbufferSize
- Buffer size for copying, also represents a step for firing progress listener callback, i.e.
progress event will be fired after every copied bufferSize bytes
IOException
public static void readAndCloseStream(InputStream is)
is
- Input streampublic static void closeSilently(Closeable closeable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |