Пример #1
0
 /**
  * Typed output method for outputting double value as (textual) xml content. Equivalent to calling
  * <code>addCharacters(String.valueOf(value))</code> but likely more efficient (with streams that
  * support Typed Access API) as well as more explicit semantically.
  */
 public void addValue(double value) throws XMLStreamException {
   if (_canOutputNewChild()) {
     _context.writeValue(value);
   } else {
     _linkNewChild(_context.createValue(value));
   }
 }
Пример #2
0
 /**
  * Typed output method for outputting binary value (encoded using default Base64 encoding variant)
  * as (textual) xml content.
  *
  * @since 2.2
  */
 @SuppressWarnings("unchecked")
 public <T extends SMOutputContainer> T addValue(byte[] value, int offset, int length)
     throws XMLStreamException {
   if (_canOutputNewChild()) {
     _context.writeValue(value, offset, length);
   } else {
     _linkNewChild(_context.createValue(value, offset, length));
   }
   return (T) this;
 }