com.arangodb.shaded.vertx.core.http.impl.NettyFileUpload Maven / Gradle / Ivy
/*
* Copyright (c) 2011-2019 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*/
package com.arangodb.shaded.vertx.core.http.impl;
import com.arangodb.shaded.netty.buffer.ByteBuf;
import com.arangodb.shaded.netty.handler.codec.http.multipart.FileUpload;
import com.arangodb.shaded.netty.handler.codec.http.multipart.InterfaceHttpData;
import com.arangodb.shaded.vertx.core.Context;
import com.arangodb.shaded.vertx.core.Handler;
import com.arangodb.shaded.vertx.core.buffer.Buffer;
import com.arangodb.shaded.vertx.core.http.HttpServerRequest;
import com.arangodb.shaded.vertx.core.streams.ReadStream;
import com.arangodb.shaded.vertx.core.streams.impl.InboundBuffer;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
/**
* @author Julien Viet
*/
final class NettyFileUpload implements FileUpload, ReadStream {
private final String name;
private String contentType;
private String filename;
private String contentTransferEncoding;
private Charset charset;
private boolean completed;
private long maxSize = -1;
private final HttpServerRequest request;
private final InboundBuffer