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

com.fasterxml.clustermate.client.ahc.BodyFileBacked Maven / Gradle / Ivy

Go to download

Almost complete ClusterMate NetworkClient implementation built on Async HTTP Client

The newest version!
package com.fasterxml.clustermate.client.ahc;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Implementation that reads content from specified {@link java.io.File}.
 *

* Chunked transfer encoding is used for files that are big enough; * currently cut-off point is 64k. */ public class BodyFileBacked extends BodyStreamBacked { protected final long _length; public BodyFileBacked(File f, long contentLength, AtomicInteger checksum) throws IOException { super(new FileInputStream(f), checksum); _length = contentLength; } @Override public long getContentLength() { return _length; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy