diff options
author | Sven Gothel <[email protected]> | 2023-10-28 12:08:11 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-10-28 12:08:11 +0200 |
commit | be7bb35a3c1c908278bb732743a23c6d85a5f853 (patch) | |
tree | de37ff910c1c0e490f5590b3c259641ed4357cc4 /java | |
parent | 9fb8e4008d2ae0b1ef0dd7d428acc64ba8a8a7bf (diff) |
DBGattServer/Value: Add convenience make[_gatt]() for initializer list (byte array)
Diffstat (limited to 'java')
-rw-r--r-- | java/org/direct_bt/DBGattValue.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/org/direct_bt/DBGattValue.java b/java/org/direct_bt/DBGattValue.java index 211afe46..b695c5cd 100644 --- a/java/org/direct_bt/DBGattValue.java +++ b/java/org/direct_bt/DBGattValue.java @@ -71,6 +71,11 @@ public class DBGattValue return new DBGattValue(p, capacity, true /* variable_length */); } + /** Convenience {@link DBGattValue} ctor function. */ + public static DBGattValue make(final byte[] p) { + return new DBGattValue(p, p.length); + } + /** * Constructor * @param value the data, which length defines the maximum writable fixed length if variable length is false. |