public class RequestPath extends Object
HttpServletRequest.getPathInfo()). Includes utility methods
for breaking the path down into its "head" (first component) and "tail"
(remainder of the path without the head).| Constructor and Description |
|---|
RequestPath(String pathInfo) |
| Modifier and Type | Method and Description |
|---|---|
String |
getHead()
Returns the first component of the path.
|
String |
getRelativePath()
Returns the full path without any leading "/" character.
|
String |
getSegment(int i)
Returns the specified zero-based path segment, or an empty string if that segment doesn't exist.
|
int |
getSegmentCount()
Returns the number of non-empty segments in the path.
|
String |
getTail()
Returns the remainder of the path after removing the first component.
|
String |
subPath(int from)
Returns the subpath starting at the specified segment (zero-based)
and extending to the end of the path.
|
public RequestPath(String pathInfo)
public String getRelativePath()
public String getHead()
public String getTail()
public String subPath(int from)
public int getSegmentCount()
public String getSegment(int i)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.