equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2012, 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 |
133 } |
133 } |
134 if (remaining == 0) { |
134 if (remaining == 0) { |
135 needToReadHeader = true; |
135 needToReadHeader = true; |
136 consumeCRLF(); |
136 consumeCRLF(); |
137 } |
137 } |
|
138 if (n < 0 && !eof) |
|
139 throw new IOException("connection closed before all data received"); |
138 return n; |
140 return n; |
139 } |
141 } |
140 |
142 |
141 private void consumeCRLF () throws IOException { |
143 private void consumeCRLF () throws IOException { |
142 char c; |
144 char c; |