@@ -0,0 +1,2680 @@
+package io.datawire.quark.runtime;%0A%0Aimport java.nio.ByteOrder;%0Aimport java.nio.charset.Charset;%0A%0Aimport io.netty.buffer.ByteBuf;%0Aimport io.netty.buffer.ByteBufAllocator;%0Aimport io.netty.buffer.ByteBufUtil;%0Aimport io.netty.util.CharsetUtil;%0A%0Aclass BufferImpl implements Buffer %7B%0A%0A    private ByteBuf b;%0A%0A    BufferImpl() %7B%0A        this(ByteBufAllocator.DEFAULT.buffer());%0A    %7D%0A%0A%0A    BufferImpl(ByteBuf b) %7B%0A        this.b = b;%0A        b.retain();%0A    %7D%0A%0A    public BufferImpl(int capacity) %7B%0A        this(ByteBufAllocator.DEFAULT.buffer(capacity));%0A    %7D%0A%0A%0A    ByteBuf buffer() %7B return b; %7D%0A%0A    @Override%0A    protected void finalize() throws Throwable %7B%0A        b.release();%0A        super.finalize();%0A    %7D%0A%0A    @Override%0A    public int capacity() %7B%0A        return b.capacity();%0A    %7D%0A%0A    @Override%0A    public byte getByte(int index) %7B%0A        return b.getByte(index);%0A    %7D%0A%0A    @Override%0A    public void putByte(int index, int value) %7B%0A        b.setByte(index, value);%0A    %7D%0A%0A    @Override%0A    public short getShort(int index) %7B%0A        return b.getShort(index);%0A    %7D%0A%0A    @Override%0A    public void putShort(int index, int value) %7B%0A        b.setShort(index, value);%0A    %7D%0A%0A    @Override%0A    public int getInt(int index) %7B%0A        return b.getInt(index);%0A    %7D%0A%0A    @Override%0A    public void putInt(int index, int value) %7B%0A        b.setInt(index, value);%0A    %7D%0A%0A    @Override%0A    public long getLong(int index) %7B%0A        return b.getLong(index);%0A    %7D%0A%0A    @Override%0A    public void putLong(int index, long value) %7B%0A        b.setLong(index, value);%0A    %7D%0A%0A    @Override%0A    public Double getFloat(int index) %7B%0A        return b.getDouble(index);%0A    %7D%0A%0A    @Override%0A    public void putFloat(int index, Double value) %7B%0A        b.setDouble(index, value);%0A    %7D%0A%0A    @Override%0A    public String getStringUTF8(int index, int length) %7B%0A        return b.toString(index, length, CharsetUtil.UTF_8);%0A    %7D%0A%0A    @Override%0A    public int putStringUTF8(int index, String value) %7B%0A        ByteBuf temp = b.alloc().buffer();%0A        int bytes = ByteBufUtil.writeUtf8(temp, value);%0A        b.setBytes(index, temp, 0, bytes);%0A        return bytes;%0A    %7D%0A%0A    @Override%0A    public Buffer getSlice(int index, int length) %7B%0A        return new BufferImpl(b.slice(index, length));%0A    %7D%0A%0A    @Override%0A    public void putSlice(int index, Buffer source, int offset, int length) %7B%0A        b.setBytes(index, ((BufferImpl)source).b, offset, length);%0A%0A    %7D%0A%0A    @Override%0A    public Buffer littleEndian() %7B%0A        return new BufferImpl(b.order(ByteOrder.LITTLE_ENDIAN));%0A    %7D%0A%0A    @Override%0A    public boolean isNetworkByteOrder() %7B%0A        return b.order().equals(ByteOrder.BIG_ENDIAN);%0A    %7D%0A%0A%7D%0A

Add missing file