1
2
3
4
5
6 package dev.metaschema.core.metapath.item.atomic.impl;
7
8 import java.nio.ByteBuffer;
9
10 import dev.metaschema.core.datatype.adapter.AbstractBinaryAdapter;
11 import dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem;
12 import edu.umd.cs.findbugs.annotations.NonNull;
13
14
15
16
17 public interface IBinaryItem extends IAnyAtomicItem {
18
19
20
21
22
23
24 @NonNull
25 ByteBuffer asByteBuffer();
26
27
28
29
30
31
32 @NonNull
33 default byte[] asBytes() {
34 return AbstractBinaryAdapter.bufferToBytes(asByteBuffer(), true);
35 }
36 }