Package com.github.robtimus.filesystems
Class Messages.FileChannelMessages
- java.lang.Object
-
- com.github.robtimus.filesystems.Messages.FileChannelMessages
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IllegalArgumentExceptionnegativeCount(long count)Creates an exception that can be thrown ifFileChannel.transferTo(long, long, WritableByteChannel)orFileChannel.transferFrom(ReadableByteChannel, long, long)is called with a negative count.IllegalArgumentExceptionnegativePosition(long position)Creates an exception that can be thrown ifFileChannel.read(ByteBuffer, long),FileChannel.write(ByteBuffer, long),FileChannel.transferTo(long, long, WritableByteChannel)orFileChannel.transferFrom(ReadableByteChannel, long, long)is called with a negative position.
-
-
-
Method Detail
-
negativeCount
public IllegalArgumentException negativeCount(long count)
Creates an exception that can be thrown ifFileChannel.transferTo(long, long, WritableByteChannel)orFileChannel.transferFrom(ReadableByteChannel, long, long)is called with a negative count.- Parameters:
count- The negative count.- Returns:
- The created exception.
-
negativePosition
public IllegalArgumentException negativePosition(long position)
Creates an exception that can be thrown ifFileChannel.read(ByteBuffer, long),FileChannel.write(ByteBuffer, long),FileChannel.transferTo(long, long, WritableByteChannel)orFileChannel.transferFrom(ReadableByteChannel, long, long)is called with a negative position.- Parameters:
position- The negative position.- Returns:
- The created exception.
-
-