2004-10-09 Michael Koch <konqueror@gmx.de>
* java/io/CharArrayWriter.java (resize): Removed redundant 'final' modifier. * java/io/DataInputStream.java (readFully): Throw IndexOutOfBoundsException of len < 0. * java/io/FileDescriptor.java, java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/ObjectOutputStream.java, java/io/ObjectStreamClass.java, java/io/PipedInputStream.java, java/io/RandomAccessFile.java: Reorganized import statements. From-SVN: r88817
This commit is contained in:
parent
f507003ab2
commit
0d2e6ffef6
10 changed files with 72 additions and 50 deletions
|
@ -279,6 +279,9 @@ public class DataInputStream extends FilterInputStream implements DataInput
|
|||
*/
|
||||
public final void readFully (byte[] buf, int offset, int len) throws IOException
|
||||
{
|
||||
if (len < 0)
|
||||
throw new IndexOutOfBoundsException("Negative length: " + len);
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
// in.read will block until some data is available.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue