Class Messages


  • public final class Messages
    extends Object
    A utility class for providing translated messages and exceptions.
    Author:
    Rob Spoor
    • Method Detail

      • invalidIndex

        public static IllegalArgumentException invalidIndex​(int index)
        Creates an exception that can be thrown for an invalid index.
        Parameters:
        index - The index that was invalid.
        Returns:
        The created exception.
      • invalidRange

        public static IllegalArgumentException invalidRange​(int beginIndex,
                                                            int endIndex)
        Creates an exception that can be thrown for an invalid range.
        Parameters:
        beginIndex - The begin index of the range, inclusive.
        endIndex - The end index of the range, exclusive.
        Returns:
        The created exception.
      • path

        public static Messages.PathMessages path()
        Returns an object for providing translated messages and exceptions for paths.
        Returns:
        An object for providing translated messages and exceptions for paths.
      • pathMatcher

        public static Messages.PathMatcherMessages pathMatcher()
        Returns an object for providing translated messages and exceptions for path matchers.
        Returns:
        An object for providing translated messages and exceptions for path matchers.
      • fileStore

        public static Messages.FileStoreMessages fileStore()
        Returns an object for providing translated messages and exceptions for file stores.
        Returns:
        An object for providing translated messages and exceptions for file stores.
      • fileSystemProvider

        public static Messages.FileSystemProviderMessages fileSystemProvider()
        Returns an object for providing translated messages and exceptions for file system providers.
        Returns:
        An object for providing translated messages and exceptions for file system providers.
      • directoryStream

        public static Messages.DirectoryStreamMessages directoryStream()
        Returns an object for providing translated messages and exceptions for directory streams.
        Returns:
        An object for providing translated messages and exceptions for directory streams.
      • fileChannel

        public static Messages.FileChannelMessages fileChannel()
        Returns an object for providing translated messages and exceptions for file channels.
        Returns:
        An object for providing translated messages and exceptions for file channels.
      • byteChannel

        public static Messages.ByteChannelMessages byteChannel()
        Returns an object for providing translated messages and exceptions for (seekable) byte channels.
        Returns:
        An object for providing translated messages and exceptions for (seekable) byte channels.
      • uri

        public static Messages.URIMessages uri()
        Returns an object for providing translated messages and exceptions for URI validation.
        Returns:
        An object for providing translated messages and exceptions for URI validation.