com.kttdevelopment.simplehttpserver.handler.FileBytesAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simplehttpserver Show documentation
Show all versions of simplehttpserver Show documentation
📕 SimpleHttpServer :: Simplified implementation of the sun http server :: Simplified handlers to execute complex operations
package com.kttdevelopment.simplehttpserver.handler;
import java.io.File;
/**
* This interface determines the file bytes to use when adding to {@link FileHandler}.
*
* @see FileHandlerAdapter
* @see FileHandler
* @since 01.00.00
* @version 02.00.00
* @author Ktt Development
*/
interface FileBytesAdapter {
/**
* Returns the bytes when given a file and its initial contents
*
* @param file file to name
* @param bytes bytes from preload
* @return new bytes
*
* @since 01.00.00
* @author Ktt Development
*/
default byte[] getBytes(final File file, final byte[] bytes){
return bytes;
}
}