public static boolean noMorePathSegments(ReadBuffer io) {
        int initialPosition = io.getPos();
        try {
            // Simply try to parse the PathSegment, if it succeeds, we're not at the end.
            PathSegment.staticParse(io);
            return false;
        } catch (Exception e) {
            return true;
        } finally {
            io.reset(initialPosition);
        }
    }
Tries to parse another PathSegment, if this works it returns false, if it doesn't it returns ture.
@param io readBuffer
@return false if there's another PathSegment, true if not.
plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/readwrite/utils/StaticHelper.java