- 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 classMessages.ByteChannelMessagesA utility class for providing translated messages and exceptions for (seekable) byte channels.static classMessages.DirectoryStreamMessagesA utility class for providing translated messages and exceptions for directory streams.static classMessages.FileChannelMessagesA utility class for providing translated messages and exceptions for file channels.static classMessages.FileStoreMessagesA utility class for providing translated messages and exceptions for file stores.static classMessages.FileSystemProviderEnvMessagesA utility class for providing translated messages and exceptions for file system provider properties.static classMessages.FileSystemProviderMessagesA utility class for providing translated messages and exceptions for file system providers.static classMessages.PathMatcherGlobMessagesA utility class for providing translated messages and exceptions for globs.static classMessages.PathMatcherMessagesA utility class for providing translated messages and exceptions for path matchers.static classMessages.PathMessagesA utility class for providing translated messages and exceptions for paths.static classMessages.URIMessagesA 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.ByteChannelMessagesbyteChannel()Returns an object for providing translated messages and exceptions for (seekable) byte channels.static Messages.DirectoryStreamMessagesdirectoryStream()Returns an object for providing translated messages and exceptions for directory streams.static Messages.FileChannelMessagesfileChannel()Returns an object for providing translated messages and exceptions for file channels.static Messages.FileStoreMessagesfileStore()Returns an object for providing translated messages and exceptions for file stores.static Messages.FileSystemProviderMessagesfileSystemProvider()Returns an object for providing translated messages and exceptions for file system providers.static IllegalArgumentExceptioninvalidIndex(int index)Creates an exception that can be thrown for an invalid index.static IllegalArgumentExceptioninvalidRange(int beginIndex, int endIndex)Creates an exception that can be thrown for an invalid range.static Messages.PathMessagespath()Returns an object for providing translated messages and exceptions for paths.static Messages.PathMatcherMessagespathMatcher()Returns an object for providing translated messages and exceptions for path matchers.static UnsupportedOperationExceptionunsupportedOperation(Class<?> cls, String operation)Creates anUnsupportedOperationExceptionthat can be thrown if an I/O operation, such asBasicFileAttributeView.setTimes(FileTime, FileTime, FileTime), is not supported.static Messages.URIMessagesuri()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 anUnsupportedOperationExceptionthat 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.
-
-