@Override
    public void onFinished(Stream stream) throws IOException {
        ByteBuffer byteBuffer = stream.toBuffer();
        if (stream instanceof HttpResponseHeaderPart) {
            HttpResponseHeaderPart header = (HttpResponseHeaderPart) stream;
            HttpSession session = mChain.response().session();
            session.code = header.code();
            session.message = header.message();
            session.responseHeaders = new LinkedHashMap<>(header.headers());
            session.resBodyOffset = byteBuffer.remaining();
        }
        mChain.process(byteBuffer);
    }
Constructs a {@link InjectorCallback} for HTTP response.

@param chain A {@link HttpInterceptor} chain.
netbare-injector/src/main/java/com/github/megatronking/netbare/http/HttpResponseInjectorCallback.java