stringbuilder

Java file open, read, and write utilities

Java file utilities FAQ: Do you have any Java file utilities you can share?

As I was working on another Java/Swing application this weekend, I ran across my "Java file utilities" class, and I thought I'd share that class here today. It's nothing too major, but it does include Java methods that let you open, read, write, and copy files using Java.

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.

Java “file open” and “file read” methods (examples)

Java file reading FAQ: Can you share some off-the-shelf Java methods I can use to open and read files in Java?

Sure. Taken directly from my Java file utilities article (Java file utilities to open, read, write, and copy files), here is the source code for two Java methods that let you read a text file.

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.

Java replaceAll - How to replace all blank characters in a String

Today I needed a Java method to remove all the blank characters from a String. I started to write some code with a StringBuffer or a StringBuilder, then thought there must be some other way to do this. It’s not that the StringBuilder/StringBuffer approach is hard, but just that someone must have already solved this problem.

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.