- java.lang.Object
-
- com.github.robtimus.filesystems.Messages
-
public final class Messages extends Object
A utility class for providing translated messages and exceptions.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Messages.ByteChannelMessages
A utility class for providing translated messages and exceptions for (seekable) byte channels.static class
Messages.DirectoryStreamMessages
A utility class for providing translated messages and exceptions for directory streams.static class
Messages.FileChannelMessages
A utility class for providing translated messages and exceptions for file channels.static class
Messages.FileStoreMessages
A utility class for providing translated messages and exceptions for file stores.static class
Messages.FileSystemProviderEnvMessages
A utility class for providing translated messages and exceptions for file system provider properties.static class
Messages.FileSystemProviderMessages
A utility class for providing translated messages and exceptions for file system providers.static class
Messages.PathMatcherGlobMessages
A utility class for providing translated messages and exceptions for globs.static class
Messages.PathMatcherMessages
A utility class for providing translated messages and exceptions for path matchers.static class
Messages.PathMessages
A utility class for providing translated messages and exceptions for paths.static class
Messages.URIMessages
A utility class for providing translated messages and exceptions for URI validation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Messages.ByteChannelMessages
byteChannel()
Returns an object for providing translated messages and exceptions for (seekable) byte channels.static Messages.DirectoryStreamMessages
directoryStream()
Returns an object for providing translated messages and exceptions for directory streams.static Messages.FileChannelMessages
fileChannel()
Returns an object for providing translated messages and exceptions for file channels.static Messages.FileStoreMessages
fileStore()
Returns an object for providing translated messages and exceptions for file stores.static Messages.FileSystemProviderMessages
fileSystemProvider()
Returns an object for providing translated messages and exceptions for file system providers.static IllegalArgumentException
invalidIndex(int index)
Creates an exception that can be thrown for an invalid index.static IllegalArgumentException
invalidRange(int beginIndex, int endIndex)
Creates an exception that can be thrown for an invalid range.static Messages.PathMessages
path()
Returns an object for providing translated messages and exceptions for paths.static Messages.PathMatcherMessages
pathMatcher()
Returns an object for providing translated messages and exceptions for path matchers.static UnsupportedOperationException
unsupportedOperation(Class<?> cls, String operation)
Creates anUnsupportedOperationException
that can be thrown if an I/O operation, such asBasicFileAttributeView.setTimes(FileTime, FileTime, FileTime)
, is not supported.static Messages.URIMessages
uri()
Returns an object for providing translated messages and exceptions for URI validation.
-
-
-
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.
-
unsupportedOperation
public static UnsupportedOperationException unsupportedOperation(Class<?> cls, String operation)
Creates anUnsupportedOperationException
that can be thrown if an I/O operation, such asBasicFileAttributeView.setTimes(FileTime, FileTime, FileTime)
, is not supported.- Parameters:
cls
- The class defining the operation, e.g.BasicFileAttributeView
.operation
- The name of the operation (method).- 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.
-
-