src/share/classes/java/net/HttpURLConnection.java
Print this page
*** 107,117 ****
* Some implementations may treat the <code>0</code><sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
* line, but <code>getHeaderFieldKey(0)</code> returns null.
*
! * @param n an index, where n >=0.
* @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
--- 107,117 ----
* Some implementations may treat the <code>0</code><sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
* line, but <code>getHeaderFieldKey(0)</code> returns null.
*
! * @param n an index, where {@code n >=0}.
* @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
*** 258,268 ****
* <p>
* This method can be used in conjunction with the
* {@link #getHeaderFieldKey getHeaderFieldKey} method to iterate through all
* the headers in the message.
*
! * @param n an index, where n>=0.
* @return the value of the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
--- 258,268 ----
* <p>
* This method can be used in conjunction with the
* {@link #getHeaderFieldKey getHeaderFieldKey} method to iterate through all
* the headers in the message.
*
! * @param n an index, where {@code n>=0}.
* @return the value of the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {