@Nullable
    private String readHeaderLine() {
        final int length = in.readableBytes();
        // need more data to progress
        // need at least one blank line to read (no headers)
        if (length == 0) {
            return null;
        }
        int headerLength = 0;
        int lwsp = 0;

        // Find the end of a header line which ends with `\n` or `\r\n`
        for (; headerLength < length; headerLength++) {
            final byte currentChar = in.getByte(headerLength);
            if (currentChar == '\n') {
                lwsp += 1;
                break;
            }
            if (headerLength + 1 >= length) {
                // No more data in the buffer
                return null;
            }
            if (currentChar == '\r' && in.getByte(headerLength + 1) == '\n') {
                lwsp += 2;
                break;
            }
        }
        if (headerLength == 0) {
            in.skipBytes(lwsp);
            return "";
        }

        final ByteBuf byteBuf = in.readBytes(headerLength);
        try {
            in.skipBytes(lwsp);
            return new String(ByteBufUtil.getBytes(byteBuf), HEADER_ENCODING);
        } finally {
            byteBuf.release();
        }
    }
Reads the lines for a single header.

@return a header line or an empty string if the blank line separating the
        header from the body has been reached, or {@code null} if the there is
        no more data in the buffer
core/src/main/java/com/linecorp/armeria/common/multipart/MimeParser.java