private void updatePrefix() {
        if (this.startDate == null) {
            // startDate not specified
            this.currentPrefixTime = "";
        }
        else if (this.currentPrefixTime == null) {
            // First prefix 
            this.currentPrefixTime = HOUR_FORMAT.format(this.startDate.getTime());
        }
        else if (this.currentPrefixTime.length() == HOUR_FORMAT_LENGTH) {
            // Increment the hour
            this.startDate.add(GregorianCalendar.HOUR_OF_DAY, 1);
            if (this.startDate.get(GregorianCalendar.HOUR_OF_DAY) != 0) {
                // If we are still within the same day, use the hour format
                this.currentPrefixTime = HOUR_FORMAT.format(this.startDate.getTime());
            }
            else {
                // If we've reached a day boundary, get the entire next day's logs
                this.currentPrefixTime = DAY_FORMAT.format(this.startDate.getTime());
            }
        }
        else if (this.currentPrefixTime.length() == DAY_FORMAT_LENGTH) {
            // Increment the day
            this.startDate.add(GregorianCalendar.DAY_OF_MONTH, 1);
            if (this.startDate.get(GregorianCalendar.DAY_OF_MONTH) != 1) {
                // If we are still within the same month, use the day format
                this.currentPrefixTime = DAY_FORMAT.format(this.startDate.getTime());
            }
            else {
                // If we've reached a month boundary, get the entire next month's logs
                this.currentPrefixTime = MONTH_FORMAT.format(this.startDate.getTime());
            }
        }
        else if (this.currentPrefixTime.length() == MONTH_FORMAT_LENGTH) {
            // Increment the month
            this.startDate.add(GregorianCalendar.MONTH, 1);
            if (this.startDate.get(GregorianCalendar.MONTH) != 13) { // Undecember
                // If we are still within the same year, use the month format
                this.currentPrefixTime = MONTH_FORMAT.format(this.startDate.getTime());
            }
            else {
                // If we've reached a year boundary, get the entire next year's logs
                this.currentPrefixTime = YEAR_FORMAT.format(this.startDate.getTime());
            }
        }
        else {
            // Continue to increment year and get the next year's worth of logs.
            this.startDate.add(GregorianCalendar.YEAR, 1);
            this.currentPrefixTime = YEAR_FORMAT.format(this.startDate.getTime());
        }
    }
private void updatePrefix() {
        if (this.startDate == null) {
            
            this.currentPrefixTime = "";
        }
        else if (this.currentPrefixTime == null) {
            
            this.currentPrefixTime = HOUR_FORMAT.format(this.startDate.getTime());
        }
        else if (this.currentPrefixTime.length() == HOUR_FORMAT_LENGTH) {
            
            this.startDate.add(GregorianCalendar.HOUR_OF_DAY, 1);
            if (this.startDate.get(GregorianCalendar.HOUR_OF_DAY) != 0) {
                
                this.currentPrefixTime = HOUR_FORMAT.format(this.startDate.getTime());
            }
            else {
                
                this.currentPrefixTime = DAY_FORMAT.format(this.startDate.getTime());
            }
        }
        else if (this.currentPrefixTime.length() == DAY_FORMAT_LENGTH) {
            
            this.startDate.add(GregorianCalendar.DAY_OF_MONTH, 1);
            if (this.startDate.get(GregorianCalendar.DAY_OF_MONTH) != 1) {
                
                this.currentPrefixTime = DAY_FORMAT.format(this.startDate.getTime());
            }
            else {
                
                this.currentPrefixTime = MONTH_FORMAT.format(this.startDate.getTime());
            }
        }
        else if (this.currentPrefixTime.length() == MONTH_FORMAT_LENGTH) {
            
            this.startDate.add(GregorianCalendar.MONTH, 1);
            if (this.startDate.get(GregorianCalendar.MONTH) != 13) { 
                
                this.currentPrefixTime = MONTH_FORMAT.format(this.startDate.getTime());
            }
            else {
                
                this.currentPrefixTime = YEAR_FORMAT.format(this.startDate.getTime());
            }
        }
        else {
            
            this.startDate.add(GregorianCalendar.YEAR, 1);
            this.currentPrefixTime = YEAR_FORMAT.format(this.startDate.getTime());
        }
    }
private void updatePrefix ( ) { if ( this . startDate == null ) { // startDate not specified this . currentPrefixTime = "" ; } else if ( this . currentPrefixTime == null ) { // First prefix  this . currentPrefixTime = HOUR_FORMAT . format ( this . startDate . getTime ( ) ) ; } else if ( this . currentPrefixTime . length ( ) == HOUR_FORMAT_LENGTH ) { // Increment the hour this . startDate . add ( GregorianCalendar . HOUR_OF_DAY , 1 ) ; if ( this . startDate . get ( GregorianCalendar . HOUR_OF_DAY ) != 0 ) { // If we are still within the same day, use the hour format this . currentPrefixTime = HOUR_FORMAT . format ( this . startDate . getTime ( ) ) ; } else { // If we've reached a day boundary, get the entire next day's logs this . currentPrefixTime = DAY_FORMAT . format ( this . startDate . getTime ( ) ) ; } } else if ( this . currentPrefixTime . length ( ) == DAY_FORMAT_LENGTH ) { // Increment the day this . startDate . add ( GregorianCalendar . DAY_OF_MONTH , 1 ) ; if ( this . startDate . get ( GregorianCalendar . DAY_OF_MONTH ) != 1 ) { // If we are still within the same month, use the day format this . currentPrefixTime = DAY_FORMAT . format ( this . startDate . getTime ( ) ) ; } else { // If we've reached a month boundary, get the entire next month's logs this . currentPrefixTime = MONTH_FORMAT . format ( this . startDate . getTime ( ) ) ; } } else if ( this . currentPrefixTime . length ( ) == MONTH_FORMAT_LENGTH ) { // Increment the month this . startDate . add ( GregorianCalendar . MONTH , 1 ) ; if ( this . startDate . get ( GregorianCalendar . MONTH ) != 13 ) { // Undecember // If we are still within the same year, use the month format this . currentPrefixTime = MONTH_FORMAT . format ( this . startDate . getTime ( ) ) ; } else { // If we've reached a year boundary, get the entire next year's logs this . currentPrefixTime = YEAR_FORMAT . format ( this . startDate . getTime ( ) ) ; } } else { // Continue to increment year and get the next year's worth of logs. this . startDate . add ( GregorianCalendar . YEAR , 1 ) ; this . currentPrefixTime = YEAR_FORMAT . format ( this . startDate . getTime ( ) ) ; } }
Updates the currentPrefixTime so that we can make a new call to listBlobs() with the next prefix.
Updates the currentPrefixTime so that we can make a new call to listBlobs () with the next prefix .