code: public byte [] getByteArrayAttribute(String name, byte [] defaultValue) {
          ByteBuffer buffer = getValue(byteArrayAttributes, name, null);
          if(buffer != null) {
              byte [] result = new byte[buffer.capacity()];
              System.arraycopy(buffer.array(), 0, result, 0, buffer.capacity());
              return result;
          }
          else {
              return defaultValue;
          }
      }
docs: Gets the byte [] value of an attribute.  This will be a copy of the actual byte [] stored in this metadata
  object, hence modifications to the return value will not affect the stored value.
  @param name The name of the attribute.  Not null.
  @param defaultValue The default value for the attribute.  May be null.  This value will be returned if this
  metadata object does not contain a byte [] value for the specified attribute name.
  @return Either the byte [] value of the attribute with the specified name, or the value specified by the defaultValue
  object if this metadata object does not contain a byte [] value for the specified attribute name.
  @throws NullPointerException if name is null.