@Override
    protected final void intercept(@NonNull final HttpRequestChain chain,
                                   @NonNull ByteBuffer buffer, int index) throws IOException {
        if (chain.request().uid() == Process.myUid()) {
            chain.process(buffer);
            return;
        }
        if (index == 0) {
            mShouldInjectRequest = mHttpInjector.sniffRequest(chain.request());
        }
        if (!mShouldInjectRequest) {
            chain.process(buffer);
            return;
        }
        if (index == 0) {
            mHttpInjector.onRequestInject(buildHeader(chain.request()), new HttpRequestInjectorCallback(chain));
        } else {
            mHttpInjector.onRequestInject(chain.request(), new HttpRawBody(buffer), new HttpRequestInjectorCallback(chain));
        }
    }
A HTTP inject interceptor holds a {@link HttpInjector}.

@author Megatron King
@since 2018-12-29 22:25
netbare-injector/src/main/java/com/github/megatronking/netbare/http/HttpInjectInterceptor.java