Package org.apache.commons.io.channels
Class FileChannels
java.lang.Object
org.apache.commons.io.channels.FileChannels
Works with
FileChannel
.- Since:
- 2.15.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
contentEquals
(FileChannel channel1, FileChannel channel2, int byteBufferSize) Tests if two RandomAccessFiles contents are equal.private static long
size
(FileChannel channel)
-
Constructor Details
-
FileChannels
private FileChannels()Don't instantiate.
-
-
Method Details
-
contentEquals
public static boolean contentEquals(FileChannel channel1, FileChannel channel2, int byteBufferSize) throws IOException Tests if two RandomAccessFiles contents are equal.- Parameters:
channel1
- A FileChannel.channel2
- Another FileChannel.byteBufferSize
- The two internal buffer capacities, in bytes.- Returns:
- true if the contents of both RandomAccessFiles are equal, false otherwise.
- Throws:
IOException
- if an I/O error occurs.
-
size
- Throws:
IOException
-