DirContext ctx;
...
Attributes attrs =
ctx.getAttributes("speedy");
Attribute size = attrs.get("paperSize");
...
size.add("legal");
// directory has not yet been updated
ctx.modifyAttributes("speedy",
REPLACE_ATTRIBUTE,
attrs);