public void reset(int pos) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Before\n{}", Hex.dump(delegate.getSource(), Hex.DefaultWidth, delegate.getIndex()));
        }
        try {
            long align = align(1);
            LOGGER.debug("aligned {}", align);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        delegate.setIndex(pos);
        LOGGER.debug("set to index {}", pos);
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("After\n{}", Hex.dump(delegate.getSource(), Hex.DefaultWidth, pos));
        }
    }
Modified version that exposes the position.
plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/io/MyDefaultBitInput.java