src/jdk.httpserver/share/classes/sun/net/httpserver/FixedLengthInputStream.java
branchhttp-client-branch
changeset 55782 0586f8664ba8
parent 55763 634d8e14c172
parent 47705 a6f8cacdef93
equal deleted inserted replaced
55780:d4b5b95da972 55782:0586f8664ba8
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    59             if (remaining == 0) {
    59             if (remaining == 0) {
    60                 t.getServerImpl().requestCompleted (t.getConnection());
    60                 t.getServerImpl().requestCompleted (t.getConnection());
    61             }
    61             }
    62         }
    62         }
    63         if (n < 0 && !eof)
    63         if (n < 0 && !eof)
    64             throw new IOException("Connection closed before all bytes received");
    64             throw new IOException("connection closed before all data received");
    65         return n;
    65         return n;
    66     }
    66     }
    67 
    67 
    68     public int available () throws IOException {
    68     public int available () throws IOException {
    69         if (eof) {
    69         if (eof) {