|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.coobird.thumbnailator.name.ConsecutivelyNumberedFilenames
public class ConsecutivelyNumberedFilenames
This class is used to produce file names based on a given format string and an internal counter which increments every time a new file name is produced.
| Constructor Summary | |
|---|---|
ConsecutivelyNumberedFilenames()
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from 0. |
|
ConsecutivelyNumberedFilenames(File dir)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from 0, with the directory specified. |
|
ConsecutivelyNumberedFilenames(File dir,
int start)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from from the given value, with the directory specified. |
|
ConsecutivelyNumberedFilenames(File dir,
String format)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string,
located in the directory specified. |
|
ConsecutivelyNumberedFilenames(File dir,
String format,
int start)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string,
located in the directory specified. |
|
ConsecutivelyNumberedFilenames(int start)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from the given value. |
|
ConsecutivelyNumberedFilenames(String format)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string. |
|
ConsecutivelyNumberedFilenames(String format,
int start)
Instantiates an ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string. |
|
| Method Summary | |
|---|---|
Iterator<File> |
iterator()
Returns an iterator which generates file names according to the rules specified by this object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsecutivelyNumberedFilenames()
ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from 0.
0123
public ConsecutivelyNumberedFilenames(int start)
ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from the given value.
5:
5678
start - The value from which to start counting.
public ConsecutivelyNumberedFilenames(File dir)
throws IOException
ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from 0, with the directory specified.
/foo/bar/:
/foo/bar/0/foo/bar/1/foo/bar/2/foo/bar/3
dir - The directory in which the files are to be located.
IOException - If the specified directory path is not a directory,
or if does not exist.public ConsecutivelyNumberedFilenames(String format)
ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string.
The numbering will be consecutive from 0.
The format string should contain the string %d which will be
replaced with a consecutively counted number. Additional formatting
can be applied. For more details, please refer to the section on
Numeric formatting in the Java API specification for the
Formatter class.
image-%d:
image-0image-1image-2image-3
format - The format string to use.
public ConsecutivelyNumberedFilenames(File dir,
int start)
throws IOException
ConsecutivelyNumberedFilenames object which
returns Files with file names which are consecutively numbered
beginning from from the given value, with the directory specified.
/foo/bar/, and the
specified value is 5:
/foo/bar/5/foo/bar/6/foo/bar/7/foo/bar/8
dir - The directory in which the files are to be located.start - The value from which to start counting.
IOException - If the specified directory path is not a directory,
or if does not exist.
public ConsecutivelyNumberedFilenames(File dir,
String format)
throws IOException
ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string,
located in the directory specified. The numbering will be consecutively
counted from 0.
The format string should contain the string %d which will be
replaced with a consecutively counted number. Additional formatting
can be applied. For more details, please refer to the section on
Numeric formatting in the Java API specification for the
Formatter class.
/foo/bar/,
with the format string image-%d:
/foo/bar/image-0/foo/bar/image-1/foo/bar/image-2/foo/bar/image-3
dir - The directory in which the files are to be located.format - The format string to use.
IOException - If the specified directory path is not a directory,
or if does not exist.
public ConsecutivelyNumberedFilenames(String format,
int start)
ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string.
The numbering will be consecutive from the specified value.
The format string should contain the string %d which will be
replaced with a consecutively counted number. Additional formatting
can be applied. For more details, please refer to the section on
Numeric formatting in the Java API specification for the
Formatter class.
/foo/bar/, and the
specified value is 5, with the format string image-%d:
image-5image-6image-7image-8
format - The format string to use.start - The value from which to start counting.
public ConsecutivelyNumberedFilenames(File dir,
String format,
int start)
throws IOException
ConsecutivelyNumberedFilenames object which
returns Files with file names which are based on a format string,
located in the directory specified. The numbering will be consecutive
from the specified value.
The format string should contain the string %d which will be
replaced with a consecutively counted number. Additional formatting
can be applied. For more details, please refer to the section on
Numeric formatting in the Java API specification for the
Formatter class.
/foo/bar/, and the
specified value is 5, with format string image-%d:
/foo/bar/image-5/foo/bar/image-6/foo/bar/image-7/foo/bar/image-8
dir - The directory in which the files are to be located.format - The format string to use.start - The value from which to start counting.
IOException - If the specified directory path is not a directory,
or if does not exist.| Method Detail |
|---|
public Iterator<File> iterator()
iterator in interface Iterable<File>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||