We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BytesCloudEventData#wrap
1 parent 8ac23dc commit a783a27Copy full SHA for a783a27
core/src/main/java/io/cloudevents/core/data/BytesCloudEventData.java
@@ -9,6 +9,9 @@ public class BytesCloudEventData implements CloudEventData {
9
10
private final byte[] value;
11
12
+ /**
13
+ * @deprecated use {@link BytesCloudEventData#wrap(byte[])}
14
+ */
15
public BytesCloudEventData(byte[] value) {
16
Objects.requireNonNull(value);
17
this.value = value;
@@ -38,4 +41,12 @@ public String toString() {
38
41
"value=" + Arrays.toString(value) +
39
42
'}';
40
43
}
44
+
45
46
+ * @param value byte array to wrap
47
+ * @return byte array wrapped in a {@link BytesCloudEventData}, which implements {@link CloudEventData}.
48
49
+ public BytesCloudEventData wrap(byte[] value) {
50
+ return new BytesCloudEventData(value);
51
+ }
52
0 commit comments