Class JDKFromStringDeserializer.NioPathDeserializer

All Implemented Interfaces:
NullValueProvider, ValueInstantiator.Gettable
Enclosing class:
JDKFromStringDeserializer

public static class JDKFromStringDeserializer.NioPathDeserializer extends JDKFromStringDeserializer
Deserializer for Path values: separate implementation (and, unlike other implementations here, public) to allow construction with a custom set of allowed URI schemes (see [databind#6129]).
Since:
3.1.6
  • Field Details

    • DEFAULT_ALLOWED_SCHEMES

      public static final Collection<String> DEFAULT_ALLOWED_SCHEMES
      URI schemes accepted unless overridden: only "file", scheme of the default FileSystem.
    • _allowedSchemes

      protected final Collection<String> _allowedSchemes
      URI schemes accepted by this instance; values with no scheme at all are always accepted (and read as local file system paths).
  • Constructor Details

    • NioPathDeserializer

      public NioPathDeserializer()
    • NioPathDeserializer

      public NioPathDeserializer(Collection<String> allowedSchemes)
      Constructor for specifying URI schemes to accept: matching is done case-insensitively, same as by java.nio.file.Paths.get(URI).

      NOTE: for allowed schemes that have no provider installed for the system class loader, look up is also attempted using this thread's context class loader (see [databind#2120]); this is never done for schemes that are not allowed.

      Parameters:
      allowedSchemes - URI schemes to accept; must not be null (but may be empty to only accept scheme-less values)
  • Method Details