|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.attachments.utils.IOUtils
public class IOUtils
Utility class containing IO helper methods
| Method Summary | |
|---|---|
static byte[] |
getStreamAsByteArray(InputStream stream)
Returns the contents of the input stream as byte array. |
static byte[] |
getStreamAsByteArray(InputStream stream,
int length)
Returns the contents of the input stream as byte array. |
static int |
readFully(InputStream in,
byte[] b)
Reads into a byte array. |
static int |
readFully(InputStream in,
byte[] b,
int off,
int len)
Same as the normal in.read(b, off, len), but tries to ensure that the entire len number of bytes is read. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int readFully(InputStream in,
byte[] b)
throws IOException
IOExceptionreadFully(java.io.InputStream, byte[], int, int)
public static int readFully(InputStream in,
byte[] b,
int off,
int len)
throws IOException
IOException
public static byte[] getStreamAsByteArray(InputStream stream)
throws IOException
stream - the InputStream
IOException
public static byte[] getStreamAsByteArray(InputStream stream,
int length)
throws IOException
stream - the InputStreamlength - the number of bytes to copy, if length < 0, the number is unlimited
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||