public abstract long size () throws IOException

Returns the current size of entity to which this channel is connected.

Returns:  The current size, measured in bytes

Exceptions:
ClosedChannelException     If this channel is closed
IOException     If some other I/O error occurs