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

com.fireflysource.net.http.server.HttpServerContentProvider Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.fireflysource.net.http.server;

import com.fireflysource.net.http.common.content.provider.HttpContentProvider;

import java.nio.ByteBuffer;

/**
 * @author Pengtao Qiu
 */
public interface HttpServerContentProvider extends HttpContentProvider {

    /**
     * The content length. If the length is -1, the content is the data stream.
     *
     * @return The content length.
     */
    long length();

    /**
     * Convert fixed length content to a ByteBuffer. If the content is the data stream, return an empty ByteBuffer.
     *
     * @return The ByteBuffer.
     */
    ByteBuffer toByteBuffer();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy