void close() {
        if (closed) {
            return;
        }

        switch (state) {
            case START_MESSAGE:
            case END_MESSAGE:
                closed = true;
                break;
            case SKIP_PREAMBLE:
                throw new MimeParsingException("Missing start boundary");
            case BODY:
                throw new MimeParsingException("No closing MIME boundary");
            case HEADERS:
                throw new MimeParsingException("No blank line found");
            default:
                throw new MimeParsingException("Invalid state: " + state);
        }
    }
Marks this parser instance as closed. Invoking this method indicates that
no more data will be pushed to the parsing buffer.

@throws MimeParsingException if the parser state is not {@code END_MESSAGE} or {@code START_MESSAGE}
core/src/main/java/com/linecorp/armeria/common/multipart/MimeParser.java