java - FileChannel.open() vs RandomAccessFile in Jdk 7 -


i know difference between following:

filechannel fc = filechannel.open(); randomaccessfile ra = new randomaccessfile("randomfile","rw); 

since java 7 class filechannel implements seekablebytechannel therefore has needs in order randomly access file.

can 2 totally same?

filechannel has many more features since gatheringbytechannel, interruptiblechannel, scatteringbytechannel. besides can lock files, transfer files, work direct byte buffers, see api


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -