In Java byte[] st = new byte[4096]
, implies that size of array st
will not exceed 4096 bytes.
The Scala equivalent is st:Array[byte] = Array()
where size is unknown. If I am reading a huge file into this array, then how can I limit the size of the array?
Will there be any side effect if I don't care about the size for the above operation?