Package org.apache.calcite.util
Class Sources
- java.lang.Object
-
- org.apache.calcite.util.Sources
-
public abstract class Sources extends java.lang.Object
Utilities forSource
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Sources.FileSource
Implementation ofSource
.
-
Constructor Summary
Constructors Modifier Constructor Description private
Sources()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Source
file(java.io.File baseDirectory, java.lang.String fileName)
private static boolean
isFile(Source source)
static Source
of(java.io.File file)
static Source
of(java.net.URL url)
private static java.lang.String
trimOrNull(java.lang.String s, java.lang.String suffix)
Looks for a suffix on a path and returns either the path with the suffix removed or null.static Source
url(java.lang.String url)
-
-
-
Method Detail
-
of
public static Source of(java.io.File file)
-
of
public static Source of(java.net.URL url)
-
file
public static Source file(java.io.File baseDirectory, java.lang.String fileName)
-
url
public static Source url(java.lang.String url)
-
trimOrNull
private static java.lang.String trimOrNull(java.lang.String s, java.lang.String suffix)
Looks for a suffix on a path and returns either the path with the suffix removed or null.
-
isFile
private static boolean isFile(Source source)
-
-