1 /*
2 * This is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as
4 * published by the Free Software Foundation; either version 2.1 of
5 * the License, or (at your option) any later version.
6 *
7 * This software is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this software; if not, write to the Free
14 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
15 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
16 */
17
18 package installtoolkit.wix;
19
20 /**
21 * Helper class to generate 8.3 filenames. <br/>
22 * This class uses the IdGenarator and builds the filename from
23 * two numbers.
24 *
25 * @author Christian Elberfeld <elberfeld@web.de>
26 */
27 public class FilenameGenarator {
28
29 protected IdGenarator prefix;
30 protected IdGenarator suffix;
31
32 public FilenameGenarator() {
33
34 this.prefix = new IdGenarator(8,null);
35 this.suffix = new IdGenarator(3,null);
36 }
37
38 /**
39 * Returns the next filename.
40 * @return 8.3 filename as String
41 */
42 public String next() {
43
44 return prefix.next() + "." + suffix.next();
45 }
46
47 }