No need to call write() function. Above code is sufficient to empty/truncate a file. This is new in java 8. Hope it Helps.
確定! 回上一頁