终结Oreilly的《Java网络编程》-UDP包与URLConnection(部分)[8]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

                                          Expires;

                                          Content-length;

Public String getHeaderFieldKey(int n)返回第n个MIME首部字段的键(字段名);

Public String getHeaderField(int n)返回第n个MIME首部字段的值;

注意:第一个字段是1而不是0;

 

Public long getHeaderFieldDate(String name,long default)  适合date

Publi int getHeaderFieldInt(String name,int default)   适合length

这两个方法都试图把键为name的字段的值转化为long或者int返回,如果失败就用default返回;

 

配制连接属性:

protected  boolean

allowUserInteraction
          If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.

protected  boolean

connected
          If false, this connection object has not created a communications link to the specified URL.

protected  boolean

doInput
          This variable is set by the setDoInput method.

protected  boolean

doOutput
          This variable is set by the setDoOutput method.

protected  long

ifModifiedSince
          Some protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time.

protected  URL

本文关键:终结Oreilly的《Java网络编程》-UDP包与URLConnection(部分)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top