public final class CharSources extends Object
CharSource objects to be created.| Modifier and Type | Method and Description |
|---|---|
static CharSource |
ofContent(byte[] content)
Obtains an instance of
CharSource from a text variable, specified as a byte array. |
static CharSource |
ofContent(byte[] content,
Charset charset)
Obtains an instance of
CharSource from a text variable, specified as a byte array. |
static CharSource |
ofContent(String content)
Obtains an instance of
CharSource from a text variable, specified as a String object. |
static CharSource |
ofFile(File file)
Obtains an instance of
CharSource from a file object, specified as a File. |
static CharSource |
ofFile(File file,
Charset charset)
Obtains an instance of
CharSource from a file object, specified as a File. |
static CharSource |
ofFileName(String fileName)
Obtains an instance of
CharSource from a file name, specified as a String. |
static CharSource |
ofFileName(String fileName,
Charset charset)
Obtains an instance of
CharSource from a file name, specified as a String. |
static CharSource |
ofPath(Path path)
Obtains an instance of
CharSource from a file path, specified as a Path. |
static CharSource |
ofPath(Path path,
Charset charset)
Obtains an instance of
CharSource from a file path, specified as a Path. |
static CharSource |
ofUrl(URL url)
Obtains an instance of
CharSource from a URL, specified as a URL object. |
static CharSource |
ofUrl(URL url,
Charset charset)
Obtains an instance of
CharSource from an URL, specified as a URL object. |
public static CharSource ofFileName(String fileName)
CharSource from a file name, specified as a String.fileName - the file name, as a StringCharSource with UTF-8 for charset.public static CharSource ofFileName(String fileName, Charset charset)
CharSource from a file name, specified as a String.
This also takes in a specific character set, as a Charset.fileName - the file name, as a Stringcharset - the charset to build the new CharSource based onCharSourcepublic static CharSource ofFile(File file)
CharSource from a file object, specified as a File.file - the file objectCharSource with UTF-8 for charset.public static CharSource ofFile(File file, Charset charset)
CharSource from a file object, specified as a File.
This also takes in a specific character set, as a Charset.file - the file objectcharset - the charset to build the new CharSource based onCharSourcepublic static CharSource ofPath(Path path)
CharSource from a file path, specified as a Path.path - the path to create a CharSource fromCharSource with UTF-8 for charset.public static CharSource ofPath(Path path, Charset charset)
CharSource from a file path, specified as a Path.
This also takes in a specific character set, as a Charset.path - the path to create a CharSource fromcharset - the charset to build the new CharSource based onCharSourcepublic static CharSource ofUrl(URL url)
CharSource from a URL, specified as a URL object.url - the url to create a CharSource fromCharSource with UTF-8 for charset.public static CharSource ofUrl(URL url, Charset charset)
CharSource from an URL, specified as a URL object.
This also takes in a specific character set, as a Charset.url - the url to create a CharSource fromcharset - the charset to build the new CharSource based onCharSource.public static CharSource ofContent(String content)
CharSource from a text variable, specified as a String object.content - the text to create a CharSource forCharSource with UTF-8 for charsetpublic static CharSource ofContent(byte[] content)
CharSource from a text variable, specified as a byte array.content - the text to create a CharSource forCharSource with UTF-8 for charsetpublic static CharSource ofContent(byte[] content, Charset charset)
CharSource from a text variable, specified as a byte array.
This also takes in a specific character set, as a Charset.content - the text to create a CharSource forcharset - the charset to build the new CharSource based onCharSourceCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.