Stephen Longville wrote:
Stephen Longville wrote:...
Kordor Pyrbot wrote:totalFileData = new byte[(int)v.elementAt(0).getFile().length()];
This is where the error actually happens.
Stephen Longville wrote:thanks for the reply greg:
if slightly changed the code since my last post, i now write as soon as each byte is ready, as for your advice, unless im mistaken i belive i'v already done this
within my gui i type the size of the file to be extracted (and how many(for now just one)) just to make sure its working but i still get gibberish when i extract anything past 32 characters (or bytes).
e.g. encoding the text file with: "This is my secret message" (25 bytes) works as its short, but iv been trying it with a script of hamlet i found somwhere in .txt format (201789 bytes)
to avoid any confution heres my encoding / decoding up to date:
encoder writes new WAVE header info, then begins to loop through the file data taking each byte converting it to bits and changes it aquordingly
also heres how i convert to and from bits to bytes:
I'm not quite sure what's happening in line number 39 & 40.please help & what packages is the coder using?
Kordor Pyrbot wrote:Hey Ulf can you help me with the insertion of text into a wave file datachunk?
Is that related to the chunk of code you posted earlier? If so you're going to have to explain how the code is relevant. I couldn't figure out how the original question was relevant to that code -- for example I didn't see anything which looked like an encrypted message there. And now you're asking about inserting text, presumably into the byte array which that code fills? That requires explanation too.