Class URLParser
java.lang.Object
org.deltava.util.URLParser
A utility class to parse URLs.
- Since:
- 1.0
- Version:
- 10.3
- Author:
- Luke
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancontainsPath(String path) Returns if the URL contains a particular path entry.Returns the file extension.Returns the file name and extension.Returns the first directory element.Returns the last directory element.getName()Returns the file name, minus extension.getPath()Returns the path entries.intsize()Returns the number of elements in the URL.
- 
Constructor Details- 
URLParserInitializes the object and parses the URL.- Parameters:
- rawURL- the URL to parse
 
 
- 
- 
Method Details- 
getExtension
- 
getFileName
- 
getName
- 
getPath
- 
getFirstPathReturns the first directory element.- Returns:
- the first element , or an empty string if not present
 
- 
getLastPathReturns the last directory element.- Returns:
- the last element before the file name, or an empty string if not present
 
- 
containsPathReturns if the URL contains a particular path entry.- Parameters:
- path- the path entry to search for
- Returns:
- TRUE if the URL contains the path, otherwise FALSE
 
- 
sizepublic int size()Returns the number of elements in the URL.- Returns:
- the number of elements
 
 
-