public byte[] readBytes() { InputStream input = read(); try { return LSystem.copyStreamToByteArray(input, estimateLength()); } catch (IOException ex) { throw new RuntimeException("Error reading file: " + this, ex); } finally { LSystem.close(input); } }