@DefaultImplementation(value=AvroConfigurationSerializer.class) public interface ConfigurationSerializer
| Modifier and Type | Method and Description |
|---|---|
Configuration |
fromByteArray(byte[] theBytes)
Loads a Configuration from a byte[] created with toByteArray().
|
Configuration |
fromByteArray(byte[] theBytes,
ClassHierarchy classHierarchy)
Loads a Configuration from a byte[] created with toByteArray().
|
Configuration |
fromFile(File file)
Loads a Configuration from a File created with toFile().
|
Configuration |
fromFile(File file,
ClassHierarchy classHierarchy)
Loads a Configuration from a File created with toFile().
|
Configuration |
fromString(String theString)
Decodes a String generated via toString().
|
Configuration |
fromString(String theString,
ClassHierarchy classHierarchy)
Decodes a String generated via toString().
|
Configuration |
fromTextFile(File file)
Loads a Configuration from a File created with toFile().
|
Configuration |
fromTextFile(File file,
ClassHierarchy classHierarchy)
Loads a Configuration from a File created with toFile() with ClassHierarchy.
|
byte[] |
toByteArray(Configuration conf)
Writes the Configuration to a byte[].
|
void |
toFile(Configuration conf,
File file)
Stores the given Configuration in the given File.
|
String |
toString(Configuration configuration)
Writes the Configuration as a String.
|
void |
toTextFile(Configuration conf,
File file)
Stores the given Configuration in the given Text File.
|
void toFile(Configuration conf, File file) throws IOException
conf - the Configuration to storefile - the file to store the Configuration inIOException - if there is an IO error in the process.void toTextFile(Configuration conf, File file) throws IOException
conf - the Configuration to storefile - the file to store the Configuration inIOException - if there is an IO error in the process.byte[] toByteArray(Configuration conf) throws IOException
conf - the Configuration to be convertedIOException - if encoding fails to writeString toString(Configuration configuration)
configuration - the Configuration to be convertedConfiguration fromFile(File file) throws IOException, BindException
file - the File to read from.IOException - if the File can't be read or parsedBindException - if the file contains an illegal ConfigurationConfiguration fromTextFile(File file) throws IOException, BindException
file - the File to read from.IOException - if the File can't be read or parsedBindException - if the file contains an illegal ConfigurationConfiguration fromTextFile(File file, ClassHierarchy classHierarchy) throws IOException
file - the File to read from.classHierarchy - the class hierarchy to be used.IOException - if the File can't be read or parsedConfiguration fromFile(File file, ClassHierarchy classHierarchy) throws IOException, BindException
file - the File to read from.classHierarchy - used to validate the configuration againstIOException - if the File can't be read or parsedBindException - if the file contains an illegal ConfigurationConfiguration fromByteArray(byte[] theBytes) throws IOException, BindException
theBytes - the bytes to deserialize.IOException - if the byte[] can't be deserializedBindException - if the byte[] contains an illegal Configuration.Configuration fromByteArray(byte[] theBytes, ClassHierarchy classHierarchy) throws IOException, BindException
theBytes - the bytes to deserialize.classHierarchy - used to validate the configuration againstIOException - if the byte[] can't be deserializedBindException - if the byte[] contains an illegal Configuration.Configuration fromString(String theString) throws IOException, BindException
theString - to be parsedIOException - if theString can't be parsed.BindException - if theString contains an illegal Configuration.Configuration fromString(String theString, ClassHierarchy classHierarchy) throws IOException, BindException
theString - to be parsedclassHierarchy - used to validate the configuration againstIOException - if theString can't be parsed.BindException - if theString contains an illegal Configuration.Copyright © 2017 The Apache Software Foundation. All rights reserved.