title: How to store bytes and read them back to an array
body: <p>I am trying to store a list of numbers(bytes) into a file so that I can retrieve them into a byte[].</p>
  
  <pre><code>59 20 60 21 61 22 62 23 63 24 64 25 65 26 66 27 67 28 68 29 
  67 30 66 31 65 32 64 33 63 34 62 35 61 36 60 37 59 38
  66 29 65 30 64 31 63 32 62 33 61 34 60 35 59 36 58 37
  65 28 64 29 63 30 62 31 61 32 60 33 59 34 58 35 57 36...
  </code></pre>
  
  <p>I have tried saving them into a text file but the relevant code doesn't seem to read it properly.</p>
  
  <pre><code>    try {
          File f = new File("cube_mapping2.txt");
          array = new byte[file.size()]
          FileInputStream stream = new FileInputStream(f);
          stream.read(array);
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Is there a proper way to save the file so that <code>FileInputReader.read(byte[] buffer)</code> will populate the array with my bytes?</p>