@Override public CoreMessage putBytesProperty(final SimpleString key, final byte[] value) { messageChanged(); checkProperties(); properties.putBytesProperty(key, value); return this; }
@Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; }
@Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { checkName(name); if (offset + length > value.length) { throw new JMSException("Invalid offset/length"); } byte[] newBytes = new byte[length]; System.arraycopy(value, offset, newBytes, 0, length); map.putBytesProperty(new SimpleString(name), newBytes); invalid = true; }
@Override public CoreMessage putBytesProperty(final String key, final byte[] value) { messageChanged(); checkProperties(); properties.putBytesProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); return this; }
properties.putSimpleStringProperty(key, (SimpleString) value); } else if (value instanceof byte[]) { properties.putBytesProperty(key, (byte[]) value); } else { throw new ActiveMQPropertyConversionException(value.getClass() + " is not a valid property type");
@Override public org.apache.activemq.artemis.api.core.Message putExtraBytesProperty(SimpleString key, byte[] value) { createExtraProperties().putBytesProperty(key, value); return this; }
@Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { if (offset + length > value.length) { throw new JMSException("Invalid offset/length"); } byte[] newBytes = new byte[length]; System.arraycopy(value, offset, newBytes, 0, length); map.putBytesProperty(new SimpleString(name), newBytes); }
@Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { if (offset + length > value.length) { throw new JMSException("Invalid offset/length"); } byte[] newBytes = new byte[length]; System.arraycopy(value, offset, newBytes, 0, length); map.putBytesProperty(new SimpleString(name), newBytes); }
@Override public CoreMessage putBytesProperty(final SimpleString key, final byte[] value) { messageChanged(); getProperties().putBytesProperty(key, value); return this; }
@Override public CoreMessage putBytesProperty(final SimpleString key, final byte[] value) { messageChanged(); getProperties().putBytesProperty(key, value); return this; }
@Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; }
@Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; }
@Override public CoreMessage putBytesProperty(final SimpleString key, final byte[] value) { messageChanged(); getProperties().putBytesProperty(key, value); return this; }
@Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; }
@Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; }
@Override public CoreMessage putBytesProperty(final SimpleString key, final byte[] value) { messageChanged(); checkProperties(); properties.putBytesProperty(key, value); return this; }
@Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { checkName(name); if (offset + length > value.length) { throw new JMSException("Invalid offset/length"); } byte[] newBytes = new byte[length]; System.arraycopy(value, offset, newBytes, 0, length); map.putBytesProperty(new SimpleString(name), newBytes); invalid = true; }
@Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { checkName(name); if (offset + length > value.length) { throw new JMSException("Invalid offset/length"); } byte[] newBytes = new byte[length]; System.arraycopy(value, offset, newBytes, 0, length); map.putBytesProperty(new SimpleString(name), newBytes); invalid = true; }
@Override public CoreMessage putBytesProperty(final String key, final byte[] value) { messageChanged(); checkProperties(); properties.putBytesProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); return this; }
@Test public void testBytesPropertyWithNull() throws Exception { props.putBytesProperty(key, null); Assert.assertTrue(props.containsProperty(key)); byte[] bb = (byte[]) props.getProperty(key); Assert.assertNull(bb); }