public enum JsonValidator extends Enum<JsonValidator>
Usage:
List<JsonValidator.Message> messages = JsonValidator.getInstance().validate(new File("path/to/file.json"));
Modifier and Type | Class and Description |
---|---|
static class |
JsonValidator.Message
Represents the different message types created during validation.
|
Enum Constant and Description |
---|
instance
The sole instance of this class.
|
Modifier and Type | Method and Description |
---|---|
static JsonValidator |
getInstance()
Return the sole instance of this class.
|
List<JsonValidator.Message> |
validate(File file)
Validate the content of the specified disk file against the
JSON Well Log Format specification.
|
List<JsonValidator.Message> |
validate(InputStream stream)
Validate the specified stream according to the JSON Well Log Format
specification.
|
static JsonValidator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonValidator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonValidator instance
public static JsonValidator[] values()
for (JsonValidator c : JsonValidator.values()) System.out.println(c);
public static JsonValidator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static JsonValidator getInstance()
public List<JsonValidator.Message> validate(InputStream stream) throws IOException
NOTE: The stream is owned by the client and should be closed by the client.
stream
- Stream to validate. Non-null.IOException
- If the stream access fails for some reason.IllegalArgumentException
- If stream is null.public List<JsonValidator.Message> validate(File file) throws IOException
file
- File to validate. Non-null.IllegalArgumentException
- If file is null.IOException
- If the file access fails for some reason.Copyright © 2024 Petroware AS - https://petroware.no