com.soebes.subversion.sapm
Class FileName

java.lang.Object
  extended by com.soebes.subversion.sapm.FileName

public class FileName
extends Object

This class will support you to extract the extension of a file, the path and the filename incl. the extension. We define a extension as one of the following:

Author:
Karl Heinz Marbaise

Field Summary
private  String baseName
           
private  String ext
           
private  String name
           
private  String nameWithoutExtension
           
private  String path
           
 
Constructor Summary
FileName(String fileName)
           
FileName(String fileName, boolean isDir)
           
 
Method Summary
 String getBaseName()
           
 String getExt()
           
 String getName()
           
 String getNameWithoutExtension()
           
 String getPath()
           
private  void init(String fileName, boolean isDir)
           
 void setBaseName(String baseName)
           
 void setExt(String ext)
           
 void setName(String name)
           
 void setNameWithoutExtension(String nameWithoutExtension)
           
 void setPath(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private String name

ext

private String ext

baseName

private String baseName

path

private String path

nameWithoutExtension

private String nameWithoutExtension
Constructor Detail

FileName

public FileName(String fileName,
                boolean isDir)

FileName

public FileName(String fileName)
Method Detail

init

private void init(String fileName,
                  boolean isDir)

getExt

public String getExt()
Returns:
The extension of a filename.

setExt

public void setExt(String ext)

getName

public String getName()
Returns:
The name of a file.

setName

public void setName(String name)

getBaseName

public String getBaseName()

setBaseName

public void setBaseName(String baseName)

getPath

public String getPath()

setPath

public void setPath(String path)

getNameWithoutExtension

public String getNameWithoutExtension()

setNameWithoutExtension

public void setNameWithoutExtension(String nameWithoutExtension)


Copyright © 2010-2011 SoftwareEntwicklung Beratung Schulung. All Rights Reserved.