gov.grants.apply.struts.util
Class Utils

java.lang.Object
  extended bygov.grants.apply.struts.util.Utils

public class Utils
extends java.lang.Object

This is an utility class.

Author:
Brian Husted

Field Summary
static java.lang.String DISPLAY_DATE_FORMAT
           
static java.text.SimpleDateFormat sdf
           
 
Constructor Summary
Utils()
           
 
Method Summary
static Attachment createAttachment(org.apache.struts.upload.FormFile file)
          Stores attachment.
static java.lang.String formatDate(java.util.Date d)
           
static java.lang.String formatDate(long date)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPLAY_DATE_FORMAT

public static final java.lang.String DISPLAY_DATE_FORMAT
See Also:
Constant Field Values

sdf

public static final java.text.SimpleDateFormat sdf
Constructor Detail

Utils

public Utils()
Method Detail

createAttachment

public static Attachment createAttachment(org.apache.struts.upload.FormFile file)
                                   throws java.lang.Exception
Stores attachment.

Parameters:
file - the FormFile.
Returns:
the File.
Throws:
java.lang.Exception

formatDate

public static java.lang.String formatDate(java.util.Date d)
Parameters:
d - the Date.
Returns:
the string of the formated date.

formatDate

public static java.lang.String formatDate(long date)