title: Scala - Pad an array to a certain size
body: <p>I have a method:</p>
  
  <pre><code>def loadRom(filename: String) : Array[Int] = {
    val is = new FileInputStream(filename)
    Stream.continually(is.read).takeWhile(-1 !=).toArray
  }
  </code></pre>
  
  <p>It returns an array of <code>0x8000</code> (I can always guarantee that). I want to load it into an array of <code>0x200000</code> size. Is there an elegant way to do that? What about padding it out to <code>0x200000</code>?</p>
  
  <p><strong>Edit: Whoops. I JUST noticed the padTo method does what I want. Close?</strong></p>