This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert audio file into bytes

 
Gaurav Aggarwall
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
i am working on a project of Audio Steganography.
I just wanted to know about how to convert an audio file into bytes..
just tell me the package and method used for this process..
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the FileInputStream class to read any file into a byte array.
 
Gaurav Aggarwall
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but i havent found any method in this class which could help me.

actually i am able to retrive the mp3 file from hard disk but i am not able to convert it into bytes and store inro an array.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "I am able to retrieve the mp3 file from hard disk" - what's the code for that doing if it doesn't read the file into a byte array?

Anyway, here's code to read a file into a byte array: http://www.exampledepot.com/egs/java.io/File2ByteArray.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic