Package io

Interface FileFormat<T>


public interface FileFormat<T>
Can contain all tools for parsing a specific file format from text or byte input to an object.
Since:
11.12.2021
Author:
Juyas
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(byte[] input)
    Parse all data in the given input bytes by using an encoding that is either defined within the bytes or might be a default one according to the file format.
    parse(byte[] input, Charset charset)
    Parse all data in the given input bytes by using the defined encoding.
    parse(String input)
    Parse all data in the given string.
  • Method Details

    • parse

      T parse(String input)
      Parse all data in the given string. Usually an StandardCharsets.UTF_8 encoding is expected.
      Parameters:
      input - the input string
      Returns:
      the parsed object data
    • parse

      T parse(byte[] input, Charset charset)
      Parse all data in the given input bytes by using the defined encoding.
      Parameters:
      input - the input bytes
      charset - the charset to read the bytes
      Returns:
      the parsed object data
    • parse

      T parse(byte[] input)
      Parse all data in the given input bytes by using an encoding that is either defined within the bytes or might be a default one according to the file format.
      Parameters:
      input - the input bytes
      Returns:
      the parsed object data
      See Also: