public final class PackageHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_SUFIX |
| Modifier and Type | Method and Description |
|---|---|
static String |
after(String text,
String after) |
static String |
asName(Path file)
Returns the name of the component, data format or language from the given json file
|
static File |
findCamelCoreDirectory(File dir) |
static File |
findCamelCoreModelDirectory(File dir) |
static File |
findCamelDirectory(File dir,
String path) |
static Set<File> |
findJsonFiles(File rootDir,
Set<File> files) |
static Stream<Path> |
findJsonFiles(Path rootDir) |
static String |
getSchemaKind(String json)
Extract the model kind from a given json schema
|
static String |
loadText(File file) |
static String |
loadText(InputStream in)
Loads the entire stream into memory as a String and returns it.
|
static String |
loadText(Path file) |
static Map<String,String> |
parseAsMap(String data)
Parses the text as a map (eg key=value)
|
static Stream<Path> |
walk(Path rootDir) |
static void |
writeText(File file,
String text) |
public static final String JSON_SUFIX
public static String loadText(InputStream in) throws IOException
IOExceptionpublic static String loadText(File file) throws IOException
IOExceptionpublic static String loadText(Path file) throws IOException
IOExceptionpublic static void writeText(File file, String text) throws IOException
IOExceptionpublic static Map<String,String> parseAsMap(String data)
data - the datapublic static String asName(Path file)
Apache Camel