Class IOUtils
- java.lang.Object
-
- org.apache.axiom.attachments.utils.IOUtils
-
public class IOUtils extends Object
Deprecated.This class is no longer used and will be removed in Axiom 1.3. You may want to use Commons IO instead.Utility class containing I/O helper methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static byte[]
getStreamAsByteArray(InputStream stream)
Deprecated.Returns the contents of the input stream as byte array.static byte[]
getStreamAsByteArray(InputStream stream, int length)
Deprecated.Returns the contents of the input stream as byte array.static int
readFully(InputStream in, byte[] b)
Deprecated.Reads into a byte array.static int
readFully(InputStream in, byte[] b, int off, int len)
Deprecated.Same as the normalin.read(b, off, len)
, but tries to ensure that the entire len number of bytes is read.
-
-
-
Method Detail
-
readFully
public static int readFully(InputStream in, byte[] b) throws IOException
Deprecated.Reads into a byte array. Ensures that the full buffer is read. Helper method, just callsreadFully(in, b, 0, b.length)
- Throws:
IOException
- See Also:
readFully(java.io.InputStream, byte[], int, int)
-
readFully
public static int readFully(InputStream in, byte[] b, int off, int len) throws IOException
Deprecated.Same as the normalin.read(b, off, len)
, but tries to ensure that the entire len number of bytes is read.- Returns:
- Returns the number of bytes read, or -1 if the end of file is reached before any bytes are read
- Throws:
IOException
-
getStreamAsByteArray
public static byte[] getStreamAsByteArray(InputStream stream) throws IOException
Deprecated.Returns the contents of the input stream as byte array.- Parameters:
stream
- theInputStream
- Returns:
- the stream content as byte array
- Throws:
IOException
-
getStreamAsByteArray
public static byte[] getStreamAsByteArray(InputStream stream, int length) throws IOException
Deprecated.Returns the contents of the input stream as byte array.- Parameters:
stream
- theInputStream
length
- the number of bytes to copy, if length < 0, the number is unlimited- Returns:
- the stream content as byte array
- Throws:
IOException
-
-