Getting content of a file in byte array

Hi all, I need to get the content of a file (can be .doc or .tiff) into a byte array. Please guide me how do I do it. Is there any way to do it without file operations, may be just by using API methods?
[217 byte] By [Anushka_Shaha] at [2007-11-27 9:00:44]
# 1

Hi

I dont know how to retrieve a file using native API, you need I/O streams.

An I/O stream represents a stream of data to somewhere, so when you read a stream you are retrieving data from the device it is connected to eg: Keyboard, disk file .

An output Stream (system.out) allows you to send data to the screen), FileWriter allows you to send data to a disk file and so on

Bye

Message was edited by:

charllescuba

charllescubaa at 2007-7-12 21:29:47 > top of Java-index,Java Essentials,Java Programming...
# 2
Read about byte streams in this tutorial: http://java.sun.com/docs/books/tutorial/essential/io/
hunter9000a at 2007-7-12 21:29:47 > top of Java-index,Java Essentials,Java Programming...