in openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireStreamMessage.java [181:207]
protected void writeElement(Object value, DataOutput output) throws IOException {
if (value == null) {
OpenWireMarshallingSupport.marshalNull(output);
} else if (value instanceof String) {
OpenWireMarshallingSupport.marshalString(output, (String) value);
} else if (value instanceof Character) {
OpenWireMarshallingSupport.marshalChar(output, (Character) value);
} else if (value instanceof Boolean) {
OpenWireMarshallingSupport.marshalBoolean(output, (Boolean) value);
} else if (value instanceof Byte) {
OpenWireMarshallingSupport.marshalByte(output, (Byte) value);
} else if (value instanceof Short) {
OpenWireMarshallingSupport.marshalShort(output, (Short) value);
} else if (value instanceof Integer) {
OpenWireMarshallingSupport.marshalInt(output, (Integer) value);
} else if (value instanceof Float) {
OpenWireMarshallingSupport.marshalFloat(output, (Float) value);
} else if (value instanceof Double) {
OpenWireMarshallingSupport.marshalDouble(output, (Double) value);
} else if (value instanceof byte[]) {
OpenWireMarshallingSupport.marshalByteArray(output, (byte[]) value, 0, ((byte[]) value).length);
} else if (value instanceof Long) {
OpenWireMarshallingSupport.marshalLong(output, (Long) value);
} else {
throw new IOException("Unsupported Object type: " + value.getClass());
}
}