1 |
/* HttpURLConnection.java - Subclass of communications links using |
/* HttpURLConnection.java -- Subclass of communications links using |
2 |
Hypertext Transfer Protocol. |
Hypertext Transfer Protocol. |
3 |
Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation |
Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation |
4 |
|
|
5 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
537 |
public InputStream getErrorStream() |
public InputStream getErrorStream() |
538 |
{ |
{ |
539 |
if (! connected) |
if (! connected) |
540 |
return (null); |
return null; |
541 |
|
|
542 |
int code; |
int code; |
543 |
try |
try |
550 |
} |
} |
551 |
|
|
552 |
if (code == -1) |
if (code == -1) |
553 |
return (null); |
return null; |
554 |
|
|
555 |
if (((code / 100) != 4) || ((code / 100) != 5)) |
if (((code / 100) != 4) || ((code / 100) != 5)) |
556 |
return (null); |
return null; |
557 |
|
|
558 |
try |
try |
559 |
{ |
{ |
561 |
|
|
562 |
int i = pbis.read(); |
int i = pbis.read(); |
563 |
if (i == -1) |
if (i == -1) |
564 |
return (null); |
return null; |
565 |
|
|
566 |
pbis.unread(i); |
pbis.unread(i); |
567 |
return (pbis); |
return pbis; |
568 |
} |
} |
569 |
catch (IOException e) |
catch (IOException e) |
570 |
{ |
{ |
571 |
return (null); |
return null; |
572 |
} |
} |
573 |
} |
} |
574 |
|
|