private boolean isURLStart() {
        // The 'h' in https?:// already matched - need to match the rest of it
        boolean isStart = true;

        int pos = position + 1;

        // The 't' in http://
        if (pos < buffer.length()) {
            isStart &= buffer.get(pos) == (byte) 't' || buffer.get(pos) == (byte) 'T';
        }
        pos++;

        // The 't' in http://
        if (pos < buffer.length()) {
            isStart &= buffer.get(pos) == (byte) 't' || buffer.get(pos) == (byte) 'T';
        }
        pos++;

        // The 'p' in http://
        if (pos < buffer.length()) {
            isStart &= buffer.get(pos) == (byte) 'p' || buffer.get(pos) == (byte) 'P';
        }
        pos++;

        // The (optional) 's' in https://
        if (pos < buffer.length()) {
            boolean isSecure = buffer.get(pos) == (byte) 's' || buffer.get(pos) == (byte) 'S';
            if (isSecure) {
                pos++;
            }
        }

        // The ':' in http://
        if (pos < buffer.length()) {
            isStart &= buffer.get(pos) == (byte) ':';
        }
        pos++;

        // The '/' in http://
        if (pos < buffer.length()) {
            isStart &= buffer.get(pos) == (byte) '/';
        }
        pos++;

        // The '/' in http://
        if (pos < buffer.length()) {
            isStart &= buffer.get(pos) == (byte) '/';
        }
        pos++;

        return isStart;
    }
@return true if the current position in the buffer points to a URL
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/rewrite/URLRewritingStream.java