public final class Providers extends Object
Modifier and Type | Method and Description |
---|---|
static Provider |
provider(File file) |
static Provider |
provider(File file,
Charset encoding) |
static Provider |
provider(InputStream input) |
static Provider |
provider(InputStream input,
Charset encoding) |
static Provider |
provider(Path path) |
static Provider |
provider(Path path,
Charset encoding) |
static Provider |
provider(Reader reader) |
static Provider |
provider(String source) |
static Provider |
resourceProvider(ClassLoader classLoader,
String pathToResource,
Charset encoding)
Provide a Provider from the resource found in class loader with the provided encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource |
static Provider |
resourceProvider(String pathToResource)
Provide a Provider from the resource found in the current class loader with UTF-8 encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource |
static Provider |
resourceProvider(String pathToResource,
Charset encoding)
Provide a Provider from the resource found in the current class loader with the provided encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource |
public static final Charset UTF8
public static Provider provider(InputStream input, Charset encoding)
public static Provider provider(InputStream input)
public static Provider provider(File file, Charset encoding) throws FileNotFoundException
FileNotFoundException
public static Provider provider(File file) throws FileNotFoundException
FileNotFoundException
public static Provider provider(Path path, Charset encoding) throws IOException
IOException
public static Provider provider(Path path) throws IOException
IOException
public static Provider resourceProvider(ClassLoader classLoader, String pathToResource, Charset encoding) throws IOException
IOException
public static Provider resourceProvider(String pathToResource, Charset encoding) throws IOException
IOException
public static Provider resourceProvider(String pathToResource) throws IOException
IOException
Copyright © 2007–2016. All rights reserved.