 <p><code>[B@5f18cd5</code> is not a byte, it's a string representation of a reference. You can't turn them back into anything. </p> <pre><code>public class Ref { public static void main(final String[] args) { System.out.println(new Ref()); } } //Outputs: Ref@19e0bfd </code></pre> <p><code>foo@address</code> is a reference. You're not actually writing values into the file but references as String. <code>B[</code> means that you're writing <code>byte[]</code> into a file but not the actual bytes <em>in</em> that array. </p> <p><strong>Update</strong></p> <p>You're probably looking for something like this:</p> <pre><code>public static void main(final String[] args) throws FileNotFoundException, IOException { final File f = new File("/tmp/output"); final ObjectOutputStream oos = new ObjectOutputStream( new FileOutputStream(f)); for (int i = 0; i &lt; 8; i++) { final double d = Math.sin(i); System.out.println(d); oos.writeDouble(d); } oos.flush(); oos.close(); System.out.println("---"); final ObjectInputStream ois = new ObjectInputStream( new FileInputStream(f)); for (int i = 0; i &lt; 8; i++) System.out.println(ois.readDouble()); ois.close(); } </code></pre>