jdk/src/share/classes/java/net/URLConnection.java
changeset 24865 09b1d992ca72
parent 24260 55a72a7e0cf9
equal deleted inserted replaced
24864:a7bf63ebda64 24865:09b1d992ca72
   153  * @see     java.net.URLConnection#setDoInput(boolean)
   153  * @see     java.net.URLConnection#setDoInput(boolean)
   154  * @see     java.net.URLConnection#setDoOutput(boolean)
   154  * @see     java.net.URLConnection#setDoOutput(boolean)
   155  * @see     java.net.URLConnection#setIfModifiedSince(long)
   155  * @see     java.net.URLConnection#setIfModifiedSince(long)
   156  * @see     java.net.URLConnection#setRequestProperty(java.lang.String, java.lang.String)
   156  * @see     java.net.URLConnection#setRequestProperty(java.lang.String, java.lang.String)
   157  * @see     java.net.URLConnection#setUseCaches(boolean)
   157  * @see     java.net.URLConnection#setUseCaches(boolean)
   158  * @since   JDK1.0
   158  * @since   1.0
   159  */
   159  */
   160 public abstract class URLConnection {
   160 public abstract class URLConnection {
   161 
   161 
   162    /**
   162    /**
   163      * The URL represents the remote object on the World Wide Web to
   163      * The URL represents the remote object on the World Wide Web to
   281      * @since 1.6
   281      * @since 1.6
   282      */
   282      */
   283     private MessageHeader requests;
   283     private MessageHeader requests;
   284 
   284 
   285    /**
   285    /**
   286     * @since   JDK1.1
   286     * @since   1.1
   287     */
   287     */
   288     private static FileNameMap fileNameMap;
   288     private static FileNameMap fileNameMap;
   289 
   289 
   290     /**
   290     /**
   291      * @since 1.2.2
   291      * @since 1.2.2
   493      * long.
   493      * long.
   494      *
   494      *
   495      * @return  the content length of the resource that this connection's URL
   495      * @return  the content length of the resource that this connection's URL
   496      *          references, or {@code -1} if the content length is
   496      *          references, or {@code -1} if the content length is
   497      *          not known.
   497      *          not known.
   498      * @since 7.0
   498      * @since 1.7
   499      */
   499      */
   500     public long getContentLengthLong() {
   500     public long getContentLengthLong() {
   501         return getHeaderFieldLong("content-length", -1);
   501         return getHeaderFieldLong("content-length", -1);
   502     }
   502     }
   503 
   503 
   621      * @param   name      the name of the header field.
   621      * @param   name      the name of the header field.
   622      * @param   Default   the default value.
   622      * @param   Default   the default value.
   623      * @return  the value of the named field, parsed as a long. The
   623      * @return  the value of the named field, parsed as a long. The
   624      *          {@code Default} value is returned if the field is
   624      *          {@code Default} value is returned if the field is
   625      *          missing or malformed.
   625      *          missing or malformed.
   626      * @since 7.0
   626      * @since 1.7
   627      */
   627      */
   628     public long getHeaderFieldLong(String name, long Default) {
   628     public long getHeaderFieldLong(String name, long Default) {
   629         String value = getHeaderField(name);
   629         String value = getHeaderField(name);
   630         try {
   630         try {
   631             return Long.parseLong(value);
   631             return Long.parseLong(value);