Package org.apache.felix.cm.file
Class ConfigurationHandler
- java.lang.Object
-
- org.apache.felix.cm.file.ConfigurationHandler
-
@Deprecated public class ConfigurationHandler extends java.lang.Object
Deprecated.The use of this package is deprecated. Custom persistence managers are not supported.TheConfigurationHandler
class implements configuration reading form ajava.io.InputStream
and writing to ajava.io.OutputStream
on behalf of theFilePersistenceManager
class.cfg = prop "=" value . prop = symbolic-name . // 1.4.2 of OSGi Core Specification symbolic-name = token { "." token } . token = { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' } . value = [ type ] ( "[" values "]" | "(" values ")" | simple ) . values = simple { "," simple } . simple = """ stringsimple """ . type = // 1-char type code . stringsimple = // quoted string representation of the value .
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Dictionary
read(java.io.InputStream ins)
Deprecated.Reads configuration data from the givenInputStream
and returns a newDictionary
object containing the data.static void
write(java.io.OutputStream out, java.util.Dictionary properties)
Deprecated.Writes the configuration data from theDictionary
to the givenOutputStream
.
-
-
-
Method Detail
-
write
public static void write(java.io.OutputStream out, java.util.Dictionary properties) throws java.io.IOException
Deprecated.Writes the configuration data from theDictionary
to the givenOutputStream
.This method writes at the current location in the stream and does not close the output stream.
- Parameters:
out
- TheOutputStream
to write the configuration data to.properties
- TheDictionary
to write.- Throws:
java.io.IOException
- If an error occurs writing to the output stream.
-
read
public static java.util.Dictionary read(java.io.InputStream ins) throws java.io.IOException
Deprecated.Reads configuration data from the givenInputStream
and returns a newDictionary
object containing the data.This method reads from the current location in the stream up to the end of the stream but does not close the stream at the end.
- Parameters:
ins
- TheInputStream
from which to read the configuration data.- Returns:
- A
Dictionary
object containing the configuration data. This object may be empty if the stream contains no configuration data. - Throws:
java.io.IOException
- If an error occurs reading from the stream. This exception is also thrown if a syntax error is encountered.
-
-