I am about to deploy my
java application but before i did some performance speed
testing using java visualvm profiler.
I wanted to test read(byte []) method of FileInputStream and compare it with read method of BufferedInputStream but because of both are too fast and using visualvm i can not catch it because it terminated so fast so i can not see the performance .
inputStream.read(fileContent)
here is why i am baffled. How come can i use read(byte []) like above (and it is working fine without error or exceptions) because BufferedInputStream does not have
any method like read(byte []) . So i want to know using the method like below am i using method of fileinputstream or the method of any other java api class?also when i put some other methods which take several seconds i finally observe this method read and it was about 200 ms forreading 100 files in a folder and there it was shown me that this method comes from FilterInputStream.
In other words using it like this: inputStream.read(fileContent) means that i am working with BufferedInputStream , FilterInputStream or FileInputStream?
Also doing it like i have done in method above is there any way to improve performance speed or this is the best way to read file and put it in an array of byte?