FileDocCategorySizeDatePackage
FileName.javaAPI DocphoneME MR2 API (J2ME)3051Wed May 02 17:59:48 BST 2007makedep

FileName

public class FileName extends Object

Fields Summary
private String
dir
private String
prefix
private String
stem
private String
suffix
private String
inverseDir
private String
altSuffix
private String
dpss
private String
psa
private String
dpsa
private String
pss
private Platform
plat
Constructors Summary
public FileName(Platform plat, String dir, String prefix, String stem, String suffix, String inverseDir, String altSuffix)
None of the passed strings may be null.

	if ((dir == null) ||
	    (prefix == null) ||
	    (stem == null) ||
	    (suffix == null) ||
	    (inverseDir == null) ||
	    (altSuffix == null)) {
	    throw new NullPointerException("All arguments must be non-null");
	}

	this.plat = plat;

	this.dir = dir;
	this.prefix = prefix;
	this.stem = stem;
	this.suffix = suffix;
	this.inverseDir = inverseDir;
	this.altSuffix = altSuffix;

	pss = prefix + stem + suffix;
	dpss = dir + prefix + stem + suffix;
	psa = prefix + stem + altSuffix;
	dpsa = dir + prefix + stem + altSuffix;

	checkLength(plat);
    
Methods Summary
public voidcheckLength(Platform p)

	int len;
	String s;
	int suffLen = suffix.length();
	int altSuffLen = altSuffix.length();
	if (suffLen >= altSuffLen) {
	    len = suffLen;
	    s = suffix;
	} else {
	    len = altSuffLen;
	    s = altSuffix;
	}
	len += prefix.length() + stem.length();
	int lim = p.fileNameLengthLimit();
	if (len > lim) {
	    p.fatalError(prefix + stem + s + " is too long: " +
			 len + " >= " + lim);
	}
    
public makedep.FileNamecopyStem(java.lang.String newStem)

	return new FileName(plat, dir, prefix, newStem,
			    suffix, inverseDir, altSuffix);
    
public java.lang.StringdirPreStemAltSuff()

	return dpsa;
    
public java.lang.StringdirPreStemSuff()

	return dpss;
    
java.lang.StringgetInvDir()

	return inverseDir;
    
java.lang.StringnameOfList()

	return stem;
    
public java.lang.StringpreStemAltSuff()

	return psa;
    
public java.lang.StringpreStemSuff()

	return pss;