Java 类org.apache.catalina.util.DateTool 实例源码

项目:class-guard    文件:Response.java   
/**
 * Add the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void addDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted()) {
        return;
    }

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    addHeader(name, FastHttpDateFormat.formatDate(value, format));

}
项目:class-guard    文件:Response.java   
/**
 * Set the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void setDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted()) {
        return;
    }

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    setHeader(name, FastHttpDateFormat.formatDate(value, format));

}
项目:apache-tomcat-7.0.57    文件:Response.java   
/**
 * Add the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void addDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted()) {
        return;
    }

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    addHeader(name, FastHttpDateFormat.formatDate(value, format));

}
项目:apache-tomcat-7.0.57    文件:Response.java   
/**
 * Set the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void setDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted()) {
        return;
    }

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    setHeader(name, FastHttpDateFormat.formatDate(value, format));
}
项目:apache-tomcat-7.0.57    文件:Response.java   
/**
 * Add the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void addDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted()) {
        return;
    }

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    addHeader(name, FastHttpDateFormat.formatDate(value, format));

}
项目:apache-tomcat-7.0.57    文件:Response.java   
/**
 * Set the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void setDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted()) {
        return;
    }

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    setHeader(name, FastHttpDateFormat.formatDate(value, format));
}
项目:WBSAirback    文件:Response.java   
/**
 * Add the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void addDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted())
        return;

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    addHeader(name, FastHttpDateFormat.formatDate(value, format));

}
项目:WBSAirback    文件:Response.java   
/**
 * Set the specified date header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Date value to be set
 */
@Override
public void setDateHeader(String name, long value) {

    if (name == null || name.length() == 0) {
        return;
    }

    if (isCommitted())
        return;

    // Ignore any call from an included servlet
    if (included) {
        return;
    }

    if (format == null) {
        format = new SimpleDateFormat(DateTool.HTTP_RESPONSE_DATE_HEADER,
                                      Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    setHeader(name, FastHttpDateFormat.formatDate(value, format));

}
项目:lams    文件:SSIMediator.java   
public void setConfigTimeFmt(String configTimeFmt, boolean fromConstructor) {
    this.configTimeFmt = configTimeFmt;
    //What's the story here with DateTool.LOCALE_US?? Why??
    this.strftime = new Strftime(configTimeFmt, DateTool.LOCALE_US);
    //Variables like DATE_LOCAL, DATE_GMT, and LAST_MODIFIED need to be
    // updated when
    //the timefmt changes. This is what Apache SSI does.
    setDateVariables(fromConstructor);
}
项目:jerrydog    文件:SSIMediator.java   
public void setConfigTimeFmt( String configTimeFmt, boolean fromConstructor ) {
this.configTimeFmt = configTimeFmt;

//What's the story here with DateTool.LOCALE_US?? Why??
this.strftime = new Strftime( configTimeFmt, DateTool.LOCALE_US );

//Variables like DATE_LOCAL, DATE_GMT, and LAST_MODIFIED need to be updated when
//the timefmt changes.  This is what Apache SSI does.
setDateVariables( fromConstructor );
   }
项目:HowTomcatWorks    文件:SSIMediator.java   
public void setConfigTimeFmt( String configTimeFmt, boolean fromConstructor ) {
this.configTimeFmt = configTimeFmt;

//What's the story here with DateTool.LOCALE_US?? Why??
this.strftime = new Strftime( configTimeFmt, DateTool.LOCALE_US );

//Variables like DATE_LOCAL, DATE_GMT, and LAST_MODIFIED need to be updated when
//the timefmt changes.  This is what Apache SSI does.
setDateVariables( fromConstructor );
   }
项目:WBSAirback    文件:SSIMediator.java   
public void setConfigTimeFmt(String configTimeFmt, boolean fromConstructor) {
    this.configTimeFmt = configTimeFmt;
    //What's the story here with DateTool.LOCALE_US?? Why??
    this.strftime = new Strftime(configTimeFmt, DateTool.LOCALE_US);
    //Variables like DATE_LOCAL, DATE_GMT, and LAST_MODIFIED need to be
    // updated when
    //the timefmt changes. This is what Apache SSI does.
    setDateVariables(fromConstructor);
}
项目:lams    文件:SSIFlastmod.java   
protected String formatDate(Date date, String configTimeFmt) {
    Strftime strftime = new Strftime(configTimeFmt, DateTool.LOCALE_US);
    return strftime.format(date);
}
项目:jerrydog    文件:SSIFlastmod.java   
protected String formatDate( Date date, String configTimeFmt ) {
Strftime strftime = new Strftime( configTimeFmt, DateTool.LOCALE_US );
return strftime.format( date );
   }
项目:HowTomcatWorks    文件:SSIFlastmod.java   
protected String formatDate( Date date, String configTimeFmt ) {
Strftime strftime = new Strftime( configTimeFmt, DateTool.LOCALE_US );
return strftime.format( date );
   }
项目:WBSAirback    文件:SSIFlastmod.java   
protected String formatDate(Date date, String configTimeFmt) {
    Strftime strftime = new Strftime(configTimeFmt, DateTool.LOCALE_US);
    return strftime.format(date);
}