bufferedreader

Java BufferedReader, readLine, and a Scala while loop alvin September 14, 2016 - 8:52pm

I generally try to avoid this coding style these days, but, if you want to see how to use a Java BufferedReader and its readLine method in a Scala while loop, here you go:

Java BufferedReader examples

Java file FAQ: Can you share some examples of the Java BufferedReader class?

When it comes to reading character input streams, the Java BufferedReader class is extremely important, and I'll demonstrate this in several different source code examples.

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, 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.

A Java FileReader class example

Java file FAQ: Can you demonstrate how to use the Java FileReader class?

I have a number of examples on this site about how to read a file with Java, but I've never dug into it from the aspect of how and why to use a Java FileReader, so I thought I'd take a few moments and dig into the FileReader class in this article.

The Java FileReader class

The FileReader javadoc provides a nice introduction to the FileReader class:

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 URL and URLConnection example - how to read content from a URL

Question: Using Java, how can I open a URL from my program, and then read the content of that URL?

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.

How to open and read a text file in Java (FileReader, BufferedReader)

Java File I/O FAQ: How do I open a file and read text from it using Java? (Also written as, "How do I use the Java BufferedReader and FileReader classes to read from a text file?")

Here's a method taken from a Java class I wrote that shows how to open and read a file using Java and the Java FileReader class. This uses the most recent Java 5 syntax and classes.

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 HttpURLConnection (how to open and read a url with Java)

On this blog I've shown a variety of ways using Java to open a URL connection, and then read data from that connection, including my "How to open and read from a URL with the Java URL and URLConnection classes" tutorial. In this example I'll show how to open a URL using the Java HttpURLConnection class.

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.

How to open and read from a URL in Java (with just the URL class)

On this blog I've shown several examples of how to read content from a URL using Java In this example I'd like to show how you can open a URL and read content from that URL by just using the Java URL class.

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.

A Java socket client class (example source code)

Summary: This article shares the source code for a simple Java Socket client class. This article demonstrates both (a) how to write to a Java socket, and (b) how to read from a Java socket.

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.