@Nullable
    protected final ResponseHeaders readHeaders(@Nullable HttpFileAttributes attrs) {
        if (attrs == null) {
            return null;
        }

        // TODO(trustin): Cache the headers (sans the 'date' header') if attrs did not change.
        final String etag = generateEntityTag(attrs);
        final ResponseHeadersBuilder headers =
                ResponseHeaders.builder(HttpStatus.OK)
                               .addLong(HttpHeaderNames.CONTENT_LENGTH, attrs.length());
        return addCommonHeaders(headers, attrs, etag);
    }
Generates the {@link ResponseHeaders} from the specified {@link HttpFileAttributes}.

@return the {@link ResponseHeaders}, or {@code null} if {@code attrs} is {@code null}.
core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFile.java