| java.lang.Object org.apache.derby.iapi.services.io.InputStreamUtil
InputStreamUtil | final public class InputStreamUtil (Code) | | Utility methods for InputStream that are stand-ins for
a small subset of DataInput methods. This avoids pushing
a DataInputStream just to get this functionality.
|
Method Summary | |
public static void | readFully(InputStream in, byte b, int offset, int len) Read a number of bytes into an array. | public static int | readLoop(InputStream in, byte b, int offset, int len) Read a number of bytes into an array.
Keep reading in a loop until len bytes are read or EOF is reached or
an exception is thrown. | public static int | readUnsignedByte(InputStream in) Read an unsigned byte from an InputStream, throwing an EOFException
if the end of the input is reached. | public static long | skipBytes(InputStream in, long n) Skip a number of bytes in the stream. |
readLoop | public static int readLoop(InputStream in, byte b, int offset, int len) throws IOException(Code) | | Read a number of bytes into an array.
Keep reading in a loop until len bytes are read or EOF is reached or
an exception is thrown. Return the number of bytes read.
(InputStream.read(byte[],int,int) does not guarantee to read len bytes
even if it can do so without reaching EOF or raising an exception.)
exception: IOException - if an I/O error occurs. |
|
|