src/main/java/org/jboss/net/protocol/file/FileURLConnection.java
public String getHeaderField(final String name)
   {
      String headerField = null;
      if (name.equalsIgnoreCase("last-modified"))
      {
         long lastModified = getLastModified();
         if (lastModified != 0)
         {
            // return the last modified date formatted according to RFC 1123
            Date modifiedDate = new Date(lastModified);
            SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
            sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
            headerField = sdf.format(modifiedDate);
         }
      }
      else if (name.equalsIgnoreCase("content-length"))
      {
         headerField = String.valueOf(file.length());
      }
      else if (name.equalsIgnoreCase("content-type"))
      {
         if (file.isDirectory())
         {
            headerField = "text/plain";
         }
         else
         {
            headerField = getFileNameMap().getContentTypeFor(file.getName());
            if (headerField == null)
            {
               try
               {
                  InputStream is = getInputStream();
                  BufferedInputStream bis = new BufferedInputStream(is);
                  headerField = URLConnection.guessContentTypeFromStream(bis);
                  bis.close();
               }
               catch(IOException e)
               {
                  // ignore
               }
            }
         }
      }
      else if (name.equalsIgnoreCase("date"))
      {
         headerField = String.valueOf(getLastModified());
      }
      else
      {
         // This always returns null currently
         headerField = super.getHeaderField(name);
      }
      return headerField;
   }
public String getHeaderField(final String name)
   {
      String headerField = null;
      if (name.equalsIgnoreCase("last-modified"))
      {
         long lastModified = getLastModified();
         if (lastModified != 0)
         {
            // return the last modified date formatted according to RFC 1123
            Date modifiedDate = new Date(lastModified);
            SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
            sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
            headerField = sdf.format(modifiedDate);
         }
      }
      else if (name.equalsIgnoreCase("content-length"))
      {
         headerField = String.valueOf(file.length());
      }
      else if (name.equalsIgnoreCase("content-type"))
      {
         if (file.isDirectory())
         {
            headerField = "text/plain";
         }
         else
         {
            headerField = getFileNameMap().getContentTypeFor(file.getName());
            if (headerField == null)
            {
               try
               {
                  InputStream is = getInputStream();
                  BufferedInputStream bis = new BufferedInputStream(is);
                  headerField = URLConnection.guessContentTypeFromStream(bis);
                  bis.close();
               }
               catch(IOException e)
               {
                  // ignore
               }
            }
         }
      }
      else if (name.equalsIgnoreCase("date"))
      {
         headerField = String.valueOf(getLastModified());
      }
      else
      {
         // This always returns null currently
         headerField = super.getHeaderField(name);
      }
      return headerField;
   }
public String getHeaderField ( final String name ) { String headerField = null ; if ( name . equalsIgnoreCase ( "last-modified" ) ) { long lastModified = getLastModified ( ) ; if ( lastModified != 0 ) { // return the last modified date formatted according to RFC 1123 Date modifiedDate = new Date ( lastModified ) ; SimpleDateFormat sdf = new SimpleDateFormat ( "EEE, dd MMM yyyy HH:mm:ss 'GMT'" , Locale . US ) ; sdf . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; headerField = sdf . format ( modifiedDate ) ; } } else if ( name . equalsIgnoreCase ( "content-length" ) ) { headerField = String . valueOf ( file . length ( ) ) ; } else if ( name . equalsIgnoreCase ( "content-type" ) ) { if ( file . isDirectory ( ) ) { headerField = "text/plain" ; } else { headerField = getFileNameMap ( ) . getContentTypeFor ( file . getName ( ) ) ; if ( headerField == null ) { try { InputStream is = getInputStream ( ) ; BufferedInputStream bis = new BufferedInputStream ( is ) ; headerField = URLConnection . guessContentTypeFromStream ( bis ) ; bis . close ( ) ; } catch ( IOException e ) { // ignore } } } } else if ( name . equalsIgnoreCase ( "date" ) ) { headerField = String . valueOf ( getLastModified ( ) ) ; } else { // This always returns null currently headerField = super . getHeaderField ( name ) ; } return headerField ; }
Provides support for the following headers:

<tt>last-modified</tt>
<tt>content-length</tt>
<tt>content-type</tt>
<tt>date</tt>
Provides support for the following headers :