From 50b5854f48eccdca7f7ef49ebfd25fcd5f027460 Mon Sep 17 00:00:00 2001 From: Leon Ziegler Date: Fri, 11 Apr 2014 15:25:59 +0200 Subject: [PATCH 2/7] Updated documentation for updated behavior of how to handle binary data in attachments. --- src/rsb/transport/Attachment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rsb/transport/Attachment.java b/src/rsb/transport/Attachment.java index 41b8961..ecce749 100644 --- a/src/rsb/transport/Attachment.java +++ b/src/rsb/transport/Attachment.java @@ -1,5 +1,6 @@ package rsb.transport; +import java.nio.ByteBuffer; import java.util.Arrays; import java.util.logging.Level; import java.util.logging.Logger; @@ -25,12 +26,12 @@ public class Attachment implements Cloneable { private UserData data; /** - * Construct an {@link Attachment} containing the data. - * + * Constructs an {@link Attachment} containing the data. Attention: For + * transferring binary data use {@link ByteBuffer}. * * @param data The piece of data which should be stored in the attachment. * This can be any Java object, but the same restrictions as for event - * payloads apply. + * payloads apply. Use {@link ByteBuffer} for transferring binary data. * @param type Data type which can be interpreted by RSB's event handling * machinery. * -- 1.7.9.5