Android Utililty Methods File Backup

List of utility methods to do File Backup

Description

The list of methods to do File Backup are organized into topic(s).

Method

voidbackup(String strFileName, int iMaxSize)
backup
final java.text.SimpleDateFormat fmt = new java.text.SimpleDateFormat(
        "yyyyMMddHHmmss");
File flSource = new File(strFileName);
if (flSource.length() > iMaxSize) {
    String strNewName = "";
    if (strFileName.indexOf(".") >= 0)
        strNewName = strFileName.substring(0,
                strFileName.lastIndexOf("."))
...
voidbackup(String strFileName, int iMaxSize, int iRemainSize)
backup
if (iMaxSize <= iRemainSize)
    throw new IllegalArgumentException();
final java.text.SimpleDateFormat fmt = new java.text.SimpleDateFormat(
        "yyyyMMddHHmmss");
File flSource = new File(strFileName);
if (flSource.length() > iMaxSize) {
    String strNewName = strFileName + "."
            + fmt.format(new java.util.Date());
...