add convenience method wrap() to DataBuffer

This commit is contained in:
Jörg Prante 2023-08-07 16:03:43 +02:00
parent ebfbba6758
commit f170147fc2
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,5 @@
group = org.xbib group = org.xbib
name = net name = net
version = 3.3.0 version = 3.3.1
org.gradle.warning.mode = ALL org.gradle.warning.mode = ALL

View file

@ -337,4 +337,7 @@ public interface DataBuffer extends Releasable {
*/ */
String toString(int index, int length, Charset charset); String toString(int index, int length, Charset charset);
default DataBuffer wrap(DataBufferFactory dataBufferFactory, byte[] bytes) {
return dataBufferFactory.wrap(bytes);
}
} }