From f170147fc2daa498f4068a3df9a6c5ef57caac38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Mon, 7 Aug 2023 16:03:43 +0200 Subject: [PATCH] add convenience method wrap() to DataBuffer --- gradle.properties | 2 +- net/src/main/java/org/xbib/net/buffer/DataBuffer.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a5b16aa..4f31883 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group = org.xbib name = net -version = 3.3.0 +version = 3.3.1 org.gradle.warning.mode = ALL diff --git a/net/src/main/java/org/xbib/net/buffer/DataBuffer.java b/net/src/main/java/org/xbib/net/buffer/DataBuffer.java index 70088b5..ff6b280 100644 --- a/net/src/main/java/org/xbib/net/buffer/DataBuffer.java +++ b/net/src/main/java/org/xbib/net/buffer/DataBuffer.java @@ -337,4 +337,7 @@ public interface DataBuffer extends Releasable { */ String toString(int index, int length, Charset charset); + default DataBuffer wrap(DataBufferFactory dataBufferFactory, byte[] bytes) { + return dataBufferFactory.wrap(bytes); + } }