Package org.apache.camel.tooling.util
Class PackageHelper
java.lang.Object
org.apache.camel.tooling.util.PackageHelper
Utility class to find, read json files.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringReturns the name of the component, data format or language from the given json filestatic Filestatic Filestatic FilefindCamelDirectory(File dir, String path) findJsonFiles(File rootDir, Set<File> files) findJsonFiles(Path rootDir) static StringgetSchemaKind(String json) Extract the model kind from a given json schemastatic Stringstatic StringloadText(InputStream in) Loads the entire stream into memory as a String and returns it.static StringparseAsMap(String data) Parses the text as a map (eg key=value)static void
-
Field Details
-
JSON_SUFIX
- See Also:
-
-
Method Details
-
loadText
Loads the entire stream into memory as a String and returns it. Warning, don't use for crazy big streams :)- Throws:
IOException
-
loadText
- Throws:
IOException
-
loadText
- Throws:
IOException
-
writeText
- Throws:
IOException
-
after
-
parseAsMap
Parses the text as a map (eg key=value)- Parameters:
data- the data- Returns:
- the map
-
findJsonFiles
-
findJsonFiles
-
findJsonFiles
-
walk
-
asName
Returns the name of the component, data format or language from the given json file -
findCamelCoreDirectory
-
findCamelCoreModelDirectory
-
findCamelDirectory
-
getSchemaKind
Extract the model kind from a given json schema
-