I tried the following code to accomplish the task of reading and writing tiff images:
// Define the source and destination file names.
String inputFile = /
FileInputStream in = new FileInputStream(imgFullPath);
FileChannel channel = in.getChannel();
ByteBuffer buffer = ByteBuffer.allocate((int)channel.size());
channel.read(buffer);
tiffEncodedImg = Base64.encode(buffer.array());
Use this contents(i.e value of "tiffEncodedImg") as src value of img tag in HTML