The Value class is used to store an attribute's value. Such a value can be either a String or a byte[], depending on the nature of the AttributeType (the default is that the Value is a String). Each value is associated to an AttributeType, and is used in an Entry or a DN.
We can create a schema aware Value, or just a plain Value. Having a schema aware Value allows further controls to be made on the value injected : its syntax will be checked against the AttributeType syntax.
Value is also a Externalizable class.
Value instances are immutable.
There are two ways to create a value:
You can create the value passing it an AttributeType, or without it. Here are the possible constructors:
The third constructor is quite specific, as Value is immutable, and it allows you to associate a SchemaManager to a Value instance (creating a new Value in the process). The new Value instance will be schema aware.
There are ways to consult the content of the Value, and its status. Here is the list of common operations: