Interface FileAdapter


public interface FileAdapter
When using a FileHandler, determines at what name a file should be located at, and what content to return to the client.
Since:
5.0.0
Version:
5.0.0
Author:
Katsute
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default byte[]
    getBytes(File file, byte[] bytes)
    Returns the bytes that the file should return.
    default String
    getName(File file)
    Returns the name that the file should be accessible at.
  • Method Details

    • getName

      default String getName(File file)
      Returns the name that the file should be accessible at. By default this returns the file name.
      Not used for directories.
      Parameters:
      file - file
      Returns:
      file name
      Since:
      5.0.0
    • getBytes

      default byte[] getBytes(File file, byte[] bytes)
      Returns the bytes that the file should return. By default this returns the files content in bytes.
      Parameters:
      file - file
      bytes - file content in bytes
      Returns:
      byte array
      Since:
      5.0.0