Re: Concatenate 2 binary variables

2004-08-31 Thread Neculai Macarie
> This should do it: > > bos = createObject("java", "java.io.ByteArrayOutputStream").init(); > bos.write(binary_stuff,0,len(binary_stuff)); > bos.write(ender,0,len(ender)); > New_binary = bos.tobytearray(); > bos.close(); > > Probably a better way with the fileinputstream but I already had this >

Re: Concatenate 2 binary variables

2004-08-31 Thread Adam Haskell
This should do it: bos = createObject("java", "java.io.ByteArrayOutputStream").init(); bos.write(binary_stuff,0,len(binary_stuff)); bos.write(ender,0,len(ender)); New_binary = bos.tobytearray(); bos.close(); Probably a better way with the fileinputstream but I already had this code so I figured I

Re: Concatenate 2 binary variables

2004-08-31 Thread Marc Campeau
> That will only work if the first file has a size that is a > multiple of 3 bytes. Thanks for the info Jochem! I guess that it's only doable using some CF add-ons like CFOBJECT then? -- Marc [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations an

Re: Concatenate 2 binary variables

2004-08-31 Thread Ben Doom
It occurs to me that you could use the system to concatenate two files, then read them as binary. ie you could "copy file1+file2 file3 /b" and then read file3. --Ben Neculai Macarie wrote: > Hi! > > Is there a way to concatenate 2 binary variables (that contain 2 files): &

Re: Concatenate 2 binary variables

2004-08-31 Thread Jochem van Dieten
Marc Campeau wrote: >>Is there a way to concatenate 2 binary variables (that contain 2 files): >> >> > Otherwise, maybe you can convert both files to Base64, do the > concatenation and then reconvert back to binary... That will only work if the first file has a size

Re: Concatenate 2 binary variables

2004-08-31 Thread Marc Campeau
> Is there a way to concatenate 2 binary variables (that contain 2 files): > > You'll probably want to use some Java (look at java.io.fileInputStream) to do that since CFFILE deals mostly with text files, especially if you want to write the results to a file. Otherwise, maybe y

Concatenate 2 binary variables

2004-08-31 Thread Neculai Macarie
Hi! Is there a way to concatenate 2 binary variables (that contain 2 files): I want to have a single variable, something like this: Thanks, [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]