class ByteBody implements Body {
        private boolean eof;
        private int lastPosition;

        @Override
        public long getContentLength() {
            return bytes.length;
        }

        @Override
        public BodyState transferTo(ByteBuf target) {<FILL_FUNCTION_BODY>}

        @Override
        public void close() {
            lastPosition = 0;
            eof = false;
        }
    }

            if (eof) {
                return BodyState.STOP;
            }

            final int remaining = bytes.length - lastPosition;
            final int initialTargetWritableBytes = target.writableBytes();
            if (remaining <= initialTargetWritableBytes) {
                target.writeBytes(bytes, lastPosition, remaining);
                eof = true;
            } else {
                target.writeBytes(bytes, lastPosition, initialTargetWritableBytes);
                lastPosition += initialTargetWritableBytes;
            }
            return BodyState.CONTINUE;
        
<no_super_class>