Class ContentUtils
java.lang.Object
org.craftercms.studio.impl.v1.util.ContentUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamconvertDocumentToStream(org.dom4j.Document document, String encoding) content the given document to streamstatic org.dom4j.Documentconvert InputStream to stringstatic StringgetPageName(String url) Returns the page name part (e.g.index.xml) of a given URLstatic StringgetParentUrl(String url) static booleanmatchesPatterns(String uri, List<String> patterns) static voidRelease a resource
-
Constructor Details
-
ContentUtils
public ContentUtils()
-
-
Method Details
-
release
Release a resource- Parameters:
resource- resource to close
-
convertStreamToXml
public static org.dom4j.Document convertStreamToXml(InputStream is) throws org.dom4j.DocumentException convert InputStream to string- Parameters:
is-- Returns:
- string
- Throws:
org.dom4j.DocumentException
-
matchesPatterns
-
getParentUrl
-
getPageName
Returns the page name part (e.g.index.xml) of a given URL- Parameters:
url-- Returns:
- page name
-
convertDocumentToStream
content the given document to stream- Parameters:
document-encoding-- Returns:
- XML as stream
-