Java IO – URL reading, Tailing etc..

In this section we look at reading data from a URL, implementing a unix like ‘tail’ in java, reading a file in reverse and some other stuff.

Reading from a URL

Get the contents of a URL as byte array

Read data from a URL and copy to a file

Read data from a url and write to a file – traditional method

Tail a file (unix like)

Read a file in reverse

Close without catching exception

close a connection in a final block without worrying about exceptions

Leave a Comment