public final class Readers extends Object
Modifier and Type | Method and Description |
---|---|
static String |
findFormat(String resourceName) |
static SceneReader |
findReader(String format)
returns a reader for the given format if available - null if not.
|
static SceneGraphComponent |
read(File file)
reads the given file with the matching reader for the file ending.
|
static SceneGraphComponent |
read(Input input)
determines the format of the given input depending on the file ending
of the URL.
|
static SceneGraphComponent |
read(SceneReader reader,
Input input)
Reads the scene from the given input with the given SceneReader.
|
static SceneGraphComponent |
read(String format,
Input input)
Reads the scene from the given input with the SceneReader for the given format.
|
static SceneGraphComponent |
read(URL url)
reads the given url with the matching reader for the file ending.
|
static void |
registerFileEndings(String format,
String... fileEndings)
Register a file ending for a format.
|
static void |
registerReader(String format,
Class<? extends SceneReader> reader)
Register a reader class to read a certain format.
|
public static void registerFileEndings(String format, String... fileEndings)
fileEnding
- the file ending.format
- the format.public static void registerReader(String format, Class<? extends SceneReader> reader)
format
- the formatreader
- the reader classpublic static SceneReader findReader(String format)
format
- String representation for the format to read.public static SceneGraphComponent read(SceneReader reader, Input input) throws IOException
reader
- the SceneReader to read with.input
- the Input to read with the given SceneReader.IOException
public static SceneGraphComponent read(String format, Input input) throws IOException
format
- the format of the given input.input
- the Input to read with the SceneReader for the given format.IOException
public static SceneGraphComponent read(File file) throws IOException
file
- the file to read.IOException
public static SceneGraphComponent read(URL url) throws IOException
url
- the url to read.IOException
public static SceneGraphComponent read(Input input) throws IOException
input
- IOException