All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.proofpoint.http.client.jetty.InputStreamBodySourceContentProvider Maven / Gradle / Ivy

The newest version!
package com.proofpoint.http.client.jetty;

import com.proofpoint.http.client.InputStreamBodySource;
import org.eclipse.jetty.client.util.InputStreamContentProvider;

import java.util.concurrent.atomic.AtomicLong;

class InputStreamBodySourceContentProvider extends InputStreamContentProvider
{
    private final long length;

    public InputStreamBodySourceContentProvider(InputStreamBodySource inputStreamBodySource, AtomicLong bytesWritten)
    {
        super(new BodySourceInputStream(inputStreamBodySource, bytesWritten), inputStreamBodySource.getBufferSize(), false);
        length = inputStreamBodySource.getLength();
    }

    @Override
    public long getLength()
    {
        return length;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy