class DynamicCompositeByteBuf {

    public int readInt() {
        checkReadableBytes0(4);
        ByteBuf first = buffers.peek();
        int firstLen = first.readableBytes();
        if (firstLen >= 4) {
            int res = first.readInt();
            readableBytes -= 4;
            if (firstLen == 4) {
                buffers.removeFirst().release();
            }
            return res;
        } else if (order() == ByteOrder.BIG_ENDIAN) {
            return (readShort() & 0xffff) << 16 | readShort() & 0xffff;
        } else {
            return readShort() & 0xFFFF | (readShort() & 0xFFFF) << 16;
        }
    }

    public  DynamicCompositeByteBuf();
    public  DynamicCompositeByteBuf(int capacity);
    public  DynamicCompositeByteBuf(ByteBuf buf);
    public  DynamicCompositeByteBuf(ByteBuf[] bufs, int offset, int len);

}