M
Mark McKay
I've used the java.util.regex and java.io libraries quite a bit, but
am unfamiliar with java.nio.
I have several files on disk that I want to open, perform a search and
replace on, and save th emodified file back to disk. Since this only
needs a front-to-back scan of the file to accomplish, I thought it may
be possible to do this transparently with the Regex and NIO libraries
directly and avoid having to read the entire file into memory.
Can this be done simply? Could someone suggest sample code for
opening and performing a search/replace operation on a file?
Thanks.
Mark McKay
am unfamiliar with java.nio.
I have several files on disk that I want to open, perform a search and
replace on, and save th emodified file back to disk. Since this only
needs a front-to-back scan of the file to accomplish, I thought it may
be possible to do this transparently with the Regex and NIO libraries
directly and avoid having to read the entire file into memory.
Can this be done simply? Could someone suggest sample code for
opening and performing a search/replace operation on a file?
Thanks.
Mark McKay