Class Sources

java.lang.Object
org.apache.calcite.util.Sources

public abstract class Sources extends Object
Utilities for Source.
  • Method Details

    • of

      public static Source of(File file)
    • of

      public static Source of(URL url)
    • file

      public static Source file(@Nullable File baseDirectory, String fileName)
    • of

      public static Source of(CharSequence s)
      Creates a Source from a character sequence such as a String.
    • fromCharSource

      public static Source fromCharSource(com.google.common.io.CharSource source)
      Creates a Source from a generic text source such as string, CharBuffer or text file. Useful when data is already in memory or can't be directly read from a file or url.
      Parameters:
      source - generic "re-readable" source of characters
      Returns:
      Source delegate for CharSource (can't be null)
      Throws:
      NullPointerException - when source is null
    • url

      public static Source url(String url)