code: @Override
      public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException {
          if (isWritable(context)) {
              MultivaluedMap<String, Object> respHeaders = context.getHeaders();
              ContainerRequestContext requestContext = requestProvider.get();
              MultivaluedMap<String, String> reqHeaders = requestContext.getHeaders();
              if (reqHeaders.containsKey(MediaStreaming.RANGE)) {
                  if (reqHeaders.containsKey(IF_RANGE)) {
                      String ifRangeHeader = reqHeaders.getFirst(IF_RANGE);
                      if (StringUtils.isBlank(ifRangeHeader)) {
                          return;
                      }
                      if (respHeaders.containsKey(HttpHeaders.ETAG)) {
                          if (MessageHelper.getHeaderString(respHeaders, HttpHeaders.ETAG)
                                  .equals(ifRangeHeader)) {
                              applyStreaming(requestContext, context);
                              return;
                          }
                      }
                      if (respHeaders.containsKey(HttpHeaders.LAST_MODIFIED)) {
                          if (MessageHelper.getHeaderString(respHeaders, HttpHeaders.LAST_MODIFIED)
                                  .equals(ifRangeHeader)) {
                              applyStreaming(requestContext, context);
                          }
                      }
                  } else {
                      applyStreaming(requestContext, context);
                  }
              }
          }
          context.proceed();
      }
docs: {@inheritDoc}