commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James King <>
Subject Why not add the readFully method to IOUtils?
Date Sun, 27 Sep 2009 13:38:56 GMT
Hi All,
Currently, there is no readFully method in IOUtils, the method that is
the same as the normal read(b, off, len) in, but
tries to ensure that the entire len number of bytes are read.

There is a readFully method in However, this method
will throw EOFException if the end of file is reached before reading
the specified length of bytes to buf.

Following are the method signatures,

public static int readFully(InputStream in, byte[] buf);

public static int readFully(InputStream in, byte[] buf, int off, int len);

My question is, why not add them to IOUtils?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message