Why can't I get FileChannel from FileWriter?

I wander why getChannel is only implemented in FileOutputStream and not in FileWriter.

Is there a real reason? Is there a way to block FileWriter in another way?

thanks...

+3
source share
1 answer

I suspect this is an oversight - note that it FileWriteris a subclass OutputStreamWriterthat does nothing but pass a to FileOutputStreamthe superclass constructor.

, FileWriter, . "" FileOutputStream OutputStreamWriter - .

+7

Source: https://habr.com/ru/post/1709193/


All Articles