• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 713
  • Last Modified:

Write a byte array in binary file

Hi there,

I have to write a byte array in a binary file.  How can I do it.  
Thank you.
0
ambuli
Asked:
ambuli
  • 4
1 Solution
 
for_yanCommented:
In the last example ther may be some issue in the answers they show how to write binary array

0
 
for_yanCommented:
http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter09/fileBinaryIO.html
This is probably the most starightfroward example, though
they do not show how to use method
write(byte[] b, int off, int len)  of the DataOutputStream

(look at the API here  and it is easy to add it to example above
http://download.oracle.com/javase/6/docs/api/java/io/DataOutputStream.html#write%28byte[],%20int,%20int%29)


0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now