class BufDataType extends BasicDataType<Buf<T>> {

        @Override
        public int compare(Buf<T> a, Buf<T> b) {
            return 0;
        }

        @Override
        public int getMemory(Buf<T> obj) {
            if (obj.data instanceof MemoryUsage) {
                return ((MemoryUsage) obj.data).usage();
            }
            if (obj.data instanceof String) {
                return ((String) obj.data).length() * 2;
            }
            return 10_000;
        }

        @Override
        @SneakyThrows
        public void write(WriteBuffer buff, Buf<T> data) {
            ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();
            try (ObjectOutput output = createOutput(buffer)) {
                data.writeExternal(output);
                output.flush();
                buff.put(buffer.nioBuffer());
            } finally {
                ReferenceCountUtil.safeRelease(buffer);
            }
        }

        @Override
        @SneakyThrows
        public void write(WriteBuffer buff, Object obj, int len) {
            ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();
            try (ObjectOutput output = createOutput(buffer)) {
                for (int i = 0; i < len; i++) {
                    @SuppressWarnings("all")
                    Buf<T> buf = ((Buf<T>) Array.get(obj, i));
                    buf.writeExternal(output);
                }
                output.flush();
                buff.put(buffer.nioBuffer());
            } finally {
                ReferenceCountUtil.safeRelease(buffer);
            }

        }

        @Override
        @SneakyThrows
        public void read(ByteBuffer buff, Object obj, int len) {<FILL_FUNCTION_BODY>}

        @Override
        @SneakyThrows
        public Buf<T> read(ByteBuffer buff) {
            Buf<T> data = new Buf<>(instanceBuilder);
            try (ObjectInput input = createInput(Unpooled.wrappedBuffer(buff))) {
                data.readExternal(input);
            }
            return data;
        }


        @Override
        public Buf<T>[] createStorage(int size) {
            return new Buf[size];
        }
    }

            try (ObjectInput input = createInput(Unpooled.wrappedBuffer(buff))) {
                for (int i = 0; i < len; i++) {
                    Buf<T> data = new Buf<>(instanceBuilder);
                    data.readExternal(input);
                    Array.set(obj, i, data);
                }
            }
        
<no_super_class>